publishing apps on phones - request how to guide

Monkey Archive Forums/Monkey Discussion/publishing apps on phones - request how to guide

matty(Posted 2011) [#1]
EDIT - Perhaps we could put together a complete thread of 'how to' submit and publish an app on the various phone OSes.

Hello all, maybe I have missed something but could not find any related posts. Would those who know how be willing to post some threads on the practical things required to publish monkey apps on the android store in particular the specific things to consider and implement in development with monkey to bring an app to market. I am thinking of a wide variety of how to guides all helpfully placed in a single thread. Including basic things like required features, code snippets eg changing app icons.. the whole range of things needed as well as how to.

Thanks, Matt.


luggage(Posted 2011) [#2]
Something like that would be pretty good. Like a guide from having a finished game to having it on sale for the different targets.


dave.h(Posted 2011) [#3]
Yes that would be fantastic.Im pretty close to releasing a game on android and havent a clue what needs to be done.I dont even know which files were supposed to send off yet so any help on this matter would be great. I have figured out you can change the icon in the

build\android\rec\drawable-hdpi
-ldpi
-mdpi

not much but its a start


therevills(Posted 2011) [#4]
Well I've only done Android and iOS twice now... and Android is so easy compared to iOS! I feel like I'm running around blind when publishing an app for iOS - would love to see an idiot's guide for it :P


matty(Posted 2011) [#5]
Hi therevills, thanks for responding - would you mind perhaps outlining what you had to do to put your game on the Android market app/store? And any specific things you had to do in monkey to meet the requirements?

Thanks,
Matt


therevills(Posted 2011) [#6]
Really quickly Monkey to Android:

1. Sign up to Android Market Deveoper Console
2. Create your game :)
3. Compile for Android
4. Create your icons as stated by dave.h
5. Alter the APP_LABEL, APP_PACAKGE and SCREEN_ORIENTATION in the CONFIG.TXT
6. Compile for Android again
7. Find your apk file (yourproject.build/android/bin), open it using WinRAR and delete the META-INF folder (this is where the debug key is stored)
8. Create the key for your app:
8a. Create a folder called "keytools" and make a folder in that called "keys"
8b. Open command prompt (cmd.exe)
8c. Navigate to your keytools folder
8d. Type the following:
C:\"Program Files"\Java\jdk1.6.0_24\bin\keytool -genkey -alias yourProject.keystore -keyalg RSA -validity 20000 -keystore keys/yourProject.keystore

8e. Answer the questions prompted.
8f. Sign the apk:
C:\"Program Files"\Java\jdk1.6.0_24\bin\jarsigner -verbose -keystore keys/yourProject.keystore -signedjar yourProject-signed.apk yourProject.apk yourProject.keystore

8g. Zip align the apk:
C:\"Program Files (x86)"\Android\android-sdk\tools\zipalign -v 4 yourProject-signed.apk yourProject-signed-zipped.apk

9. In the Android Developer Console, click Upload Application
10. Fill out and upload details, screen shots and your signed and aligned apk

Done :)


anawiki(Posted 2011) [#7]
Thanks for great how to list therevills :)


dave.h(Posted 2011) [#8]
Thanks therevills this is one of the most helpfull posts ive seen.


matty(Posted 2011) [#9]
Thanks therevills, most helpful.


Volker(Posted 2011) [#10]
Can you explain 2. more precise please?
Just joking, indeed helpful.


c.k.(Posted 2011) [#11]
LOL, Volker!

Somebody should write a book about that one. :D


matty(Posted 2011) [#12]
Thanks once more.. I just published my game in the market it is called golden sword..


Jesse(Posted 2011) [#13]
Link please.
did you decide agains submitting it to MonkeyCoder? I thought I saw it in the apps' section but no pictures or playable.


therevills(Posted 2011) [#14]
No problem and Congrats Matty :)

@Jesse - I think its this one:

https://market.android.com/details?id=com.monkey.mattylloyd_goldensword&feature=search_result


matty(Posted 2011) [#15]
Hi Jesse - I tried submitting it to Monkeycoder but when I did it yesterday nothing appeared - it went to "Hidden Apps" and had no informtion present. I will try uploading it again....


Jesse(Posted 2011) [#16]
Thanks Therevills.
Goo going matty. I'll try it when I get a chance.


Jesse(Posted 2011) [#17]
there seems to be something wrong with the app section as it shows that skid submitted a game and is not showing anything either.


matty(Posted 2011) [#18]
This is where the html5 version is...

http://home.swiftdsl.com.au/%7Etmalcolm/goldensword/


Jesse(Posted 2011) [#19]
tried both. Quite nice. Sound would add a lot of dimension to it.
tried it with Motorola droid:
http://en.wikipedia.org/wiki/Motorola_Droid
plays really smooth.


matty(Posted 2011) [#20]
Thanks Jesse,


dave.h(Posted 2011) [#21]
i think ive got this figured but just wanted to check. In my android/bin folder i have 3 files

monkeygame.ap_
monkeygame-debug.apk
monkeygame-debug-unaligned.apk

is it the monkeygame-debug.apk that i use and apply the changes to and can i change its name just using rename or will this mess things up.EG change it to
mygame.apk


therevills(Posted 2011) [#22]
Yep you can rename it without any issues and yes that is the correct apk.


dave.h(Posted 2011) [#23]
thanks thats the last of my problems resolved i think.God help me if i try the iphone its supposed to a lot trickier :)


therevills(Posted 2011) [#24]
its supposed to a lot trickier


It is!! I HATE IT!! I've done it twice now and I still dont know how to do it!!!


matty(Posted 2011) [#25]
Just one more thing to add -

When uploading to Android market - when you want to update the package you need to update the version code and version name.

Note that the version information is stored in "AndroidManifest.xml" which is in the templates folder of your build folder for the Android target.

You need to change the following properties:

(this is taken from my current file so the information you supply (ie 103) may differ).

android:versionCode="103"
android:versionName="1.03"

Note that the version code doesn't seem to allow a decimal point.

Edit - Also - you may find it helpful to put the signing and zipaligning commands that therevills showed above into a batch file so that you can simply run it without having to type all that text in each time. You should not need to create the key again after doing it the first time, just the jarsigning and zipaligning.

Also - you can delete the META-INF folder by opening in windows XP zip by changing the .apk filename to .zip then removing the folder and then changing it back to .apk


Tibit(Posted 2011) [#26]
Matty, congrats to publishing your game. Unfortunatly I have bad news for you. I downloaded
golden sword from the market, but it freezes (yet the music plays). This may be a severe monkey bug?

Anyhow I never was able to get into the game, neither could I close the App.

However eventually Andriod said the app was not responding (still playing music though) and I got the option to force-exit it.

Let me know if you update, I'll try again. I have a HTC Wildfire.


matty(Posted 2011) [#27]
Hi tibit, not sure why that is happening, seems to work on some phones and not others. All images are power of two and all standard monkey commands so I really don't know why it does that.


therevills(Posted 2011) [#28]
HTC Wildfire


This phone has pretty low specs:

Screen Res: 240 x 320
RAM: 384 MB RAM
CPU: 528 MHz

On my phone (LG Optimus One P500) Golden Sword plays, although it takes ages to load...

http://www.gsmarena.com/compare.php3?idPhone1=3337&idPhone2=3516

[edit]
BTW - Just updated it to v1.05 - the screen looks better now Matty :)
[/edit]


matty(Posted 2011) [#29]
Hello all again.

Just thought I'd bump this thread. It has all the necessary information for developing and submitting a game to the Android market but I thought it would be worth asking if we could get the same kind of information on the steps required to release on iOS.

This sort of information could be helpful to many others than just myself, although I must admit I do have quite an interest in this myself.

Thanks,
Matt


pantson(Posted 2011) [#30]
Hi

I have used these instructions successfully before, but after recompiling the app and changing the key, this time I get this error
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 1500 but got 1520 bytes)

This is after running this line
jarsigner -verbose -keystore d:\dev\keytools\keys\gp1cz.keystore -signedjar android\bin\gp1cz-signed.apk android\bin\MonkeyGame-debug.apk gp1cz.keystore

Has anyone else seen this?


pantson(Posted 2011) [#31]
fixed... helps of you delete the META-INF folder


Xaron(Posted 2011) [#32]
I currently work on guides for all three devices. It took me hours to grasp the iOS concept maybe it would help to publish a step by step guide.

Windows was the easiest of all followed by Android...


benmc(Posted 2011) [#33]
@Xaron - I'm getting really close to trying to publish for iOS, what were the hard parts I should look out for? I can get the app on all our testing devices, but when it comes time to publish, is there more to it that I need to be prepared for?


Xaron(Posted 2011) [#34]
Well maybe it's not that hard for Mac users but it was hard to me to grasp all these certificate stuff and to overcome bugs in XCode (e.g. the project name must be the same as the product/executable name, You have to use a distribution certificate which you should know how to get and apply, you have to add armv6 as another target and so on...) ;)


benmc(Posted 2011) [#35]
I haven't heard about armv6, is this something you do when you build for distribution? I just build for iOS in Monkey, and then use XCode to build for my devices / simulator. I have done release builds that work well and disabled debugging, etc.


Xaron(Posted 2011) [#36]
Yep, that's just an additional target which you have to add to overcome the validation process... I'm writing a small guide right now.


benmc(Posted 2011) [#37]
I look forward to seeing what you write up. The impression I got was that the build for iOS created the code necessary to open the project in XCode, and in which case, I can now build it for release in XCode and that would create the appropriate files for submission to the App Store.


MikeHart(Posted 2011) [#38]
Which tool can be used on OSX to delete the METAINF folder from the APK file?

UnRARX always says that the APK (renamed or not) is not a valid RAR file.


Earok(Posted 2013) [#39]
Wrote a batch script based on The Revill's excellent step by step guide.

It still requires you to manually delete the META-INF folder and rename the source apk to projectname.apk. Also you still need to enter a password, cert details etc.

WinRAR isn't necessarily required for deleting the META-INF folder, APK's are just ZIP files in disguise so all you need to do is add .ZIP on the end, open with any ZIP utility, delete the folder and then rename back to .APK.

@Echo Set Variables
SET ProjectName=MonkeyAndroidGame
SET JDKPath=C:\"Program Files"\Java\jdk1.6.0_24\bin\
SET AndroidToolsPath=C:\"Program Files (x86)"\Android\android-sdk\tools\

@Echo Do the work!
%JDKPath%\keytool.exe -genkey -alias %ProjectName%.keystore -keyalg RSA -validity 20000 -keystore %ProjectName%.keystore
%JDKPath%\jarsigner.exe -verbose -keystore %ProjectName%.keystore -signedjar %ProjectName%-signed.apk %ProjectName%.apk %ProjectName%.keystore
%AndroidToolsPath%\zipalign.exe -v 4 %ProjectName%-signed.apk %ProjectName%-signed-zipped.apk

@Echo Final verify
%JDKPath%\jarsigner.exe -verbose -verify %ProjectName%-signed-zipped.apk
pause



garyk1968(Posted 2013) [#40]
Maybe its because I have the certificates setup and in terms of getting app IDs and profiles for apps that I want to publish on the app store I find iOS no more painful than Android.

I did my first Android port a few weeks back and the whole command line JAR signing was a pain. With itunes connect and XCode its all drag and drop.

And I found the google play developer console not very intuitive when I was having issues uploading screenshots.

(Just my experience thats all)

Gary


APC(Posted 2015) [#41]
I followed you instructions and was able to prepare my "app-signed-zipped.apk" to send it to the Google Play Developer Console.
Now Google Play Developer Console requires send this error:
Upload failed
You uploaded an unsigned APK. You need to create a signed APK. Learn more about signing.

There is thins message before I upload the app to Google Play Developer Console:
License keys are now managed for each application individually.
If your application uses licensing services (e.g. if your app is a paid app, or if it uses in-app billing or APK expansion files), get your new license key on the Services & APIs page.


The Google Play Developer Console generates the "Base64-encoded RSA public key to include in my binary". Is it just a matter to pass this key to instead of generating one?
Do you have an update to your Monkey to Android instructions?