Chapter 8. Submitting Your App to the Android Market

Finally, the moment you’ve been waiting for: submitting your completed app to the Android Market. The process is actually pretty straightforward: you just need to prepare a release version of the app and upload it.

Preparing a Release Version of Your App

You need to do a few things to get the app ready for distribution:

  • Remove any debugging or logging code

  • Version the app

  • Compile the app

  • Sign the compiled app with a private key

Removing Debug Code

There’s no reason to have debugging or logging code slowing down your app while it’s running on a user’s phone. If you have added any such code (see The JavaScript Console) to your HTML, CSS, or JavaScript files, now’s the time to take it out.

You should also open up the AndroidManifest.xml file in the KiloGap folder, search for “debuggable” and set it to false. When you’re done, it should look something like this:

...
<application 
    android:icon="@drawable/icon" 
    android:label="@string/app_name"
	android:debuggable="false">
...

Note

While you have the manifest file open, you might as well check to make sure android:icon and android:label are specified as shown in the previous listing. PhoneGap normally takes care of this for you, but I think it’s worth double checking, because you won’t be able to upload your app if these values are not set.

Versioning Your App

Near the top of your AndroidManifest.xml file, you should see values set for the version name and version code for your app:

... <manifest xmlns:android="http://schemas.android.com/apk/res/android" ...

Get Building Android Apps with HTML, CSS, and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.