After you have successfully registered as an official Android developer, it's time to prepare your application for publishing. In order to publish your application, you have to sign the APK file. Before you do that, you should make sure everything is in place. Here's a laundry list of things to do before signing the application:
android:debuggable
attribute from the <application>
tag in your manifest file.<manifest>
tag, you'll find the android:versionCode
and android:versionName
attributes. If you have already published a previous version of your application, you must increase the versionCode
attribute, and you should also change the versionName
. The versionCode
attribute has to be an integer; the versionName
can be anything you like.<manifest>
tag has the android:installLocation
attribute set topreferExternal
orauto
. This will satisfy your users by ensuring that your application is installed on external storage if possible.<uses-permission>
tags in your manifest file.android:minSdkVersion
and android:targetSdkVersion
correctly. Your application will only be visible in the Android Market on phones that run a version of Android equal to or higher than the specified SDK version.Double-check all of these items. Once you are done, you can finally export a signed APK
filethat is ready to be uploaded to the market following these steps:
Next
button to bring up the dialog shown in Figure 13–2.
Figure 13–2. Choosing or creating the keystore
APK
file. Since you haven't created one yet, you'll do so now in this dialog. Just provide the location of the keystore, along with the password that you will use to secure it. If you have already created a keystore (for example, if you're publishing a second version of your application), you can select the Use existing keystore
radio button and simply provide the dialog with the location of the keystore file. Click the Next
button to bring up the dialog shown in Figure 13–3.
Figure 13–3. Creating the key for signing the APK
First and Last Name
field. The rest is optional, but it's a good idea to fill it out nevertheless. Another click on Next
, and you are shown the final dialog (see Figure 13–4).
APK
file should be stored and remember the path. You'll need it later when you want to upload that APK
to the market.When you want to publish a new version of a previously-published application, you can just reuse the keystore you created the first time you went through the dialog. In the dialog shown in Figure 13–2, just select the keystore file you created previously and provide the password for the keystore. You'll then see the dialog in Figure 13–5.
Just select the key you created previously, provide the password for it, and proceed as before. In both cases, the result will be a signed APK
file that is ready for upload to the Android Market.
NOTE: Once you upload a signed APK
, you have to use the same key to sign any subsequent versions of the same application.
So, you've created your first signed APK
—congratulations! Now let's throw a wrench into the works, and inform you about the market's multiple APK
support. For a single app, you can create multiple APK
s that use device capability filtering to get the “best fit” for each user who installs your app. This is a great feature because it means you can do things like the following:
Google will surely add more filters as time goes by, but just the set outlined here enables you to really hone in on a target device (like tablets) without having to jump through too many hoops to keep the download at a reasonable size for first-generation device support.
18.191.241.51