It took me a really long time to figure out how to sign android apps. I figured I would give everyone a tutorial about application signing.
Step 1: Go to the Command Prompt (Run/Cmd) (this also works with terminal)
Step 2: Type the following code into the command prompt: keytool -genkey -v -keystore mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999
(replace mykeystore with the name of your application)
(If using Mac OS place sudo before keytool in the command line)
Step 3: The command prompt will ask you for passwords etc. Fill it all in. When it asks if you want to use a different password, just click enter to use the one that you entered previously.
There you go, that is how you sign your android app. Now go to Corona and build your application, browse the folder that you saved it in and your done!
Yes sir! It's that easy.
really? shit....lucky i check the forum first...i almost download all stuffs that mentioned in here http://developer.android.com/guide/publishing/app-signing.html#cert ... =.=" that's so must ninjapig123...i'll try what u said
Well I'm glad, the way I do it is so much easier since keytool is already built in Java when you download it. Therefore, you do not have to download any more programs (not even the Andriod SDK). I hate it how Coronas directions page, and googles app signing directions make it so complex, but in reality, its just one line of basic code.
How do you then go about putting a description for your APP and all that goodness? is that on a android page i assume somewhere?
You first sign up for the android market which costs $25. Once you do that, you can upload an unlimited amount of data. When you are uploading the app, you have to upload different kinds of pictures (like a high rez icon photo, a banner etc). After that, you have a place to assign a title to your application, a description (up to 3000 characters), a recently changed section, and promo text.
Awesome! talk about exciting. thanks for the info, i appreciate it
Thanks, Ninjapig - really really helpful info!
There is a minor error in the keytool string that will cause a Invalid Password error when you select the keystore in Corona. The validity parameter has one too many digits. Here is the corrected code:
1 | keytool -genkey -v -keystore mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999 |
Update: The original post has been updated so it's correct.
Yes Tom, I realized that once I created this forum post. Once again, thanks for all you debuging help regarding updating applications! I'm working on open feint support right now!
I modified the number of digits in your original post so it's now correct. Thanks for posting this information to help others sign their app.
-Tom
No problem. I would recommend putting this code on your guys offical android app signing and building page. There is no information about it, and it would probably be much easier for people to find than this forum topic.
http://developer.anscamobile.com/content/building-devices-android
Thanks the link you should add the information on, just a recomendation.
You guys are the best. Let's get this posted to Ansca's official development pages, it's a boon.
You guys are the best. Let's get this posted to Ansca's official development pages, it's a boon.
When I try to do this, i get an error saying my key password is invalid. I know i have it correct because I used the same password on the keystore as on the key itself, and i can access the keystore just fine. Any thoughts?
Mark,
If you get that error it means that you have to many digits for your validity. Try removing some 9's. Look at the exsact number in the post and that is the maximum amount you can have.
Regards,
Jordan Schuetz
Ninja Pig Studios
a Help to some of you guys.
Do not I mean DO NOT ever use keywords to describe your application/game in the Android Market Application/Game Description section.
Why?
Because nearly 80% of the new developers who register violate the T.O.C for Android Market.
Your account will be suspended.
Link Please:
http://www.android.com/us/developer-content-policy.html#showlanguages
Read Under
"Spam and Placement in the Store"
1 2 3 4 5 6 | Developers are important partners in maintaining a great user experience in Android Market. Do not post repetitive content. Product descriptions should not be misleading or loaded with keywords in an attempt to manipulate ranking or relevancy in the store’s search results. Developers also should not attempt to change the placement of any Product in the Store by rating an application multiple times, or by offering incentives to users to rate an application with higher or lower ratings. Do not post an app where the primary functionality is to link to the website or the webview of a website not owned by you (unless you have permission from the website owner to do so). |
this is one of the most useful posts in the forums! thank you ninjapig123!
When I use the command prompt I get a failure, apparently "keytool" isn't a recognized command.
Do i need to download jarsigner first or something?
Jarsigner and Keytool come with the Java development package. Make sure all your path varibles are linked to Corona, then it will work fine. All you need is the JDK and all varibles linked to the Corona SDK.
Good luck,
Jordan Schuetz
Ninja Pig Studios
I've tried downloading files from Oracles website, but all I get are random install files that I can't find afterwards.
I am unable to find anything that's actually named "Java development package".
Help?
cullenjwebb if you're on a mac JDK is already installed - if on windoze go to http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
coynage, that link worked perfectly. Thank you.
Now that I know where to find keytool and jarsigner, how do I point them to Corona? When I run them all they do is open a command window and input commands for a split second.
I am sorry for being so difficult.
Thank you for your help,
-Cullen
Excellent post! Who knew it was so easy? Thank you.
How do I point the JDk to Corona and get the Keytool command to work in command?
Thanks,
Cullen
Go to the Getting Started with Windows. Its on the Ansca Mobile website.
Great info here. I am trying to build an Android version of my game and thankfully I stumbled onto this post. It built successfully.
However, I am a Mac guy with an iPhone so I have no clue how to test this before uploading it onto the Android store. Should I just go for it?
Also, when I built it, the Terminal warned me it couldn't find a copy of Icon.png to copy. I only added Icon-hdpi.png, Icon-mdpi.png, and Icon-ldpi.png as per the instructions I found. Is this okay?
Thanks!
Naohm, Ico-hdpi and Icon-mdpi are both required in the build. Icon-mdpi is for the Android market, and Icon_hdpi is for the laucher (or sprringboard on iPhone). Make sure to make these icons and include them in the folder that has you build files. Type in the search bar on the ansca mobile website "icons" and the second result will have the directions on the rez's.
Hope the helps Naohm
Regards,
Jordan Schuetz
Ninja Pig Studios
@ninjapig123
I have those two files plus the Icon-ldpi.png. So I should disregard the warning about Icon.png then? It is not needed, correct?
You don't need ldpi or icon.png, those are only for phones with the 1.6 update or lower, basically super old phones. Including those icons are unessary since almost 1 percent of all Android users still use those old phones. It also makes your APK file too big. Make sure also in your config file to make it zoomStretch instead of letterbox. Android phones have tons of different resolutions, so making the app work for the Droid will not work for the myTouch 4G.
Tell me when you publish your app and ill download it.
Regards,
Jordan Schuetz
Ninja Pig Studios
Thanks for the info.
I went with letterbox because I can't allow my game to be stretched out of proportion. It would mess it up too badly. I can live with black bars on the sides.
I will be releasing Monday most likely. I will let you know when I do.
Thanks!
@ninjapig123
I am now published!
I reworked the graphics to fit the longest phone (Droid) so I hope it looks good.
If you can download it and try it out, I would be forever grateful. All I have is an iPhone and nobody I knew was running Android 2.2 so I had no way to test it. I am just hoping for the best.
The name of the game is First Pitch.
Here's the link:
https://market.android.com/details?id=com.firstpitchgame
Thanks again!
Naohm
I checked it out but I'm broke. Make a free version that's a demo so I csn try before I buy, then add advertisments to the free version. Also make a promo graphic, it makes the game look more attractive on the market.
Regards,
Jordan Schuetz
Ninja Pig Studios
@ninjapig123
Sorry about that.
Is there no way to get a promo code like Apple's App Store offers?
I would be happy to email you one if I could.
There is no promo codes on the Android Market. You would have to build another application with a different package name and upload it. Just make a free version of your game and just put advertisments in it. You will make way more money; I have an app up on the market for about 5 days and I've already made $2.61 just on advertising. Then offer the paid version if people don't want the ads.
Its the way to go, trust me. Sign up for AdMob and search on Google Corona SDK Admob, and the sample code will come up. Very easy to implement.
Good Luck,
Regards,
Jordan Schuetz
Ninja Pig Studios
I would say lite + ads with signifcantly less levels or features plus a paid is the way to go.
This way you make money from casual gamers, but also from those who love your game in particular.
I'm making $500 a month in ads from my lite version with 24 levels and about $300 a month from the paid one with 72 levels.
Hi ninjapig123
Having just created my first app (with no coding experience until 6/7 weeks ago and lots of help on here) and managed to get through the app store submission process (as a complete novice!) I am now very frustrated with the Android process.
It would appear that you have found a very simple three step shortcut to getting apps to the android market. Sincere apologies but any chance of making this six very small steps for me? I have absolutely no idea where to find the command prompt, keystore stuff.
Very much appreciated if you or anyone else could help. Feeling incredibly de-skilled!!!!
@bob8
If you are on Windows, go to the start menu. Then type in the search bar "run". Then type in run "cmd". Then type in the code I listed above. If your on Mac you have to access terminal. Just go on Google and type in "how to access terminal" then you can type in the code I listed above.
This is only for digitally signing your apps. Once you actually build your application with Corona, you will have to upload your app to the Market. That is very simple, just pay the $25 registeration fee and you done. All you have to do is upload your .apk file, and provide google with the correct image sizes and your done. Make sure when your building your app to inculd Icon-hdpi.png and Icon-mdpi.png in your project folder.
Hope this info helps. Post any further questions here.
Regards,
Jordan Schuetz
Ninja Pig Studios
Hi Jordan / ninjapig123
Thanks for taking the time to respond and provide advice. I really do appreciate it. Corona is fantastic but also enhanced greatly by the help/support available on these forums.
I will let you know how I get on.
Regards
Bob
I have the same issue. Every time I type 'keytool' on in the command line, I get "'keytool' is not recognized as an internal or external command, operable program or batch file."
as far as pointing anything to anywhere...I can't say im that knowledgeable.
I'm able to get something to execute when I drag keytool from the bin file...but im back to the whole command line issue...
I think this is way harder than it needs to be...
M
Can't wait for the Openfeint tutorial ! Openfeint has been always confusing to me. Thanks Ninja pig.
Just type in the word keytool @michaell66, no quotes or anything. If that doesn't work you don't have the JDK installed, in which case you need to install it.
@michaelassadi I'm glad it helped you. I will work on an OpenFeint tutorial if you would like :)
Regards,
Jordan Schuetz
Ninja Pig Studios
Yes i would love that! :) I thought you said you were. I looked back and it was suport.
Yeh I will make an Open Feint tutorial once all the API is released after August 2nd.
Regards,
Jordan Schuetz
Ninja Pig Studios
Oh ok. I've been having issues getting that installed as well, though it seems to work on my laptop...I guess I'll have to use this for developing!
Thank you!
Hi all,
Big thanks to NinjaPig's instructions! Very helpful and saved me a lot of time.
Regarding the path variables, this is what I did to get it to work on my computer (Windows 7):
1) Hold Win and press Pause.
2) Click Advanced System Settings.
3) Click Environment Variables.
4) In System variables, click New:
Variable Name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk1.6.0_25
(or wherever you installed the JDK)
Click OK
5) In System variables, find the variable name "Path"
Click Edit
Here you will see a lot of paths separated by semicolons, add ;%JAVA_HOME%\bin
Click OK and your done!
Now you can follow NinjaPig's steps on signing.
Hope that helps,
David
Thanks David, you saved me a lot of headache. Your instructions worked perfectly to get keytool functioning on Windows Vista.
And thanks Jordan for explaining how to easily sign apps.
-Brian
Someone asked on this forum topic that they wanted to see an OpenFeint integrated game for Android. Well my Annoying Pig Game is now out for Android, so if anyone would be so kind to go download it at http://bit.ly/aNnOy and rate it 5 stars and leave a comment I would greatly appreciate it! Thanks!
Also another thing about keystore's, make sure to eject memory sticks since keystore's become very easily corrupted with Corona. Make sure to always have a backup!
Regards,
Jordan Schuetz
Ninja Pig Studios
i´ve done this but it don´t work by me.... cmd can´t find keytool -.-
@clercky If your computer can't find keytool, that means that you do not have the java JDK installed. You must also set up your path variables.
Regards,
Jordan Schuetz
Ninja Pig Studios
So these are the steps to take when you want to build to the actual android market?