Publishing an application means testing it, packaging it appropriately, and making it available to users of Android-powered mobile devices.
If you plan to publish your application for installation on Android-powered devices, there are several things you need to do, to get your application ready. This document highlights the significant checkpoints for preparing your application for a successful release.
If you will publish your application on Android Market, please also see Publishing on Android Market for specific preparation requirements for your application.
For general information about the ways that you can publish an applications, see the Publishing Your Applications document.
Before you consider your application ready for release:
Before you do the final compile of your application:
After you compile your application:
It's important to test your application as extensively as possible, in as
many areas as possible. To help you do that, Android provides a variety of
testing classes and tools. You can use
Instrumentation to run JUnit and other
test cases, and you can use testing
tools such as the UI/Application
-cpu-delayand others to model the emulator's screen, network performance, and other attributes to match the target device to the greatest extent possible. You can then test your application's UI and performance. However, we strongly recommend that you test your application on an actual target device before publishing it.
To protect your person, organization, and intellectual property, you may want to provide an End User License Agreement (EULA) with your application.
If you are publishing a paid application through Android Market, consider adding support for Android Market Licensing. Licensing lets you control access to your application based on whether the current user has purchased it. Using Android Market Licensing is optional.
For complete information about Android Market Licensing Service and how to use it in your application, see Licensing Your Applications.
The icon and label that you specify in an application's manifest are important because they are displayed to users as your application's icon and name. They are displayed on the device's Home screen, as well as in Manage Applications, My Downloads, and elsewhere. Additionally, publishing services may display the icon and label to users.
To specify an icon and label, you define the attributes
android:label in the
<application> element of the manifest.
As regards the design of your icon, you should try to make it match as much as possible the style used by the built-in Android applications.
For release, you should make sure that debug facilities are turned off and that debug and other unnecessary data/files are removed from your application project.
android:debuggable="true"attribute from the
<application>element of the manifest.
Logmethods in the source code.
Before you compile your application, you must make sure that you have defined
a version number for your application, specifying an appropriate value for both
attributes of the
<manifest> element in the application's
manifest file. Carefully consider your version numbering plans in the context of
your overall application upgrade strategy.
If you have previously released a version of your application, you must make
sure to increment the version number of the current application. You must
increment both the
android:versionName attributes of the
element in the application's manifest file, using appropriate values.
For detailed information about how to define version information for your application, see Versioning Your Applications.
If you have read and followed all of the preparation steps up to this point, your application is compiled and ready for signing. Inside the .apk, the application is properly versioned, and you've cleaned out extra files and private data, as described above.
Before you sign your application, you need to make sure that you have a suitable private key. For complete information about how to obtain (or generate) a private key, see Obtaining a Suitable Private Key.
Once you have obtained (or generated) a suitable private key, you will use it to:
For complete information about getting a Maps API Key, see Obtaining a Maps API Key.
If your application uses one or more Mapview elements, you will need to register your application with the Google Maps service and obtain a Maps API Key, before your MapView(s) will be able to retrieve data from Google Maps. To do so, you supply an MD5 fingerprint of your signer certificate to the Maps service.
During development, you can get a temporary Maps API Key by registering the debug key generated by the SDK tools. However, before publishing your application, you must register for a new Maps API Key that is based on your private key.
If your application uses MapView elements, the important points to understand are:
android:apiKey— in your application's layout files. If you are instantiating MapView objects directly from code, you must pass the Maps API Key as a parameter in the constructor.
When you've prepared your application as described in the previous sections, you can compile your application for release.
Sign your application using your private key and then
align it with the
zipalign tool. Signing your application
correctly is critically important. Please see
Applications for complete information.
Before you release your compiled application, you should thoroughly test it on the target mobile device (and target network, if possible). In particular, you should make sure that any MapView elements in your UI are receiving maps data properly. If they are not, go back to Register for a Maps API Key and correct the problem. You should also ensure that the application works correctly with any server-side services and data that you are providing or are relying on and that the application handles any authentication requirements correctly.
After testing, you are now ready to publish your application to mobile device users.