O'Reilly logo

Building Android Apps with HTML, CSS, and JavaScript by John Papaconstantinou, Paco Lagerstrom, Paco Nathan, Paco Hope, Jonathan Stark

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required