Preparing to Publish: A Checklist

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 onAndroid-powered devices, there are several things you need to do, to getyour application ready. This document highlights the significantcheckpoints 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 thePublishing Your Applications document.

Before you consider your application ready for release:

  1. Test your application extensively on an actual device
  2. Consider adding an End User License Agreement in your application
  3. Consider adding licensing support
  4. Specify an icon and label in the application's manifest
  5. Turn off logging and debugging and clean up data/files

Before you do the final compile of your application:

  1. Version your application
  2. Obtain a suitable cryptographic key
  3. Register for a Maps API Key, if your application is using MapView elements

Compile your application

After you compile your application:

  1. Sign your application
  2. Test your compiled application

Before you consider your application ready for release

1. Test your application extensively on an actual device

It's important to test your application as extensively as possible, in asmany areas as possible. To help you do that, Android provides a variety oftesting classes and tools. You can useInstrumentation to run JUnit and other test cases, and you can use testingtools such as theUI/ApplicationExerciser Monkey.

  • To ensure that your application will run properly for users, you should makeevery effort to obtain one or more physical mobile device(s) of the type onwhich you expect the application to run. You should then test your applicationon the actual device, under realistic network conditions. Testing yourapplication on a physical device is very important, because it enables you toverify that your user interface elements are sized correctly (especially fortouch-screen UI) and that your application's performance and battery efficiencyare acceptable.
  • If you can not obtain a mobile device of the type you are targeting for yourapplication, you can use emulator options such as-dpi,-device, -scale, -netspeed,-netdelay,-cpu-delay and others to model theemulator's screen, network performance, and other attributes to match the targetdevice to the greatest extent possible. You can then test your application's UIand performance. However, we strongly recommend that you test your applicationon an actual target device before publishing it.

2. Consider adding an End User License Agreement in your application

To protect your person, organization, and intellectual property, you may wantto provide an End User License Agreement (EULA) with your application.

3. Consider adding support for Android Market Licensing

If you are publishing a paid application through Android Market, consideradding support for Android Market Licensing. Licensing lets you control accessto 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 touse it in your application, seeLicensing YourApplications.

4. Specify an icon and label in the application's manifest

The icon and label that you specify in an application's manifest areimportant because they are displayed to users as your application's icon andname. They are displayed on the device's Home screen, as well as in ManageApplications, My Downloads, and elsewhere. Additionally, publishing services maydisplay the icon and label to users.

To specify an icon and label, you define the attributesandroid:icon andandroid:label in the element of the manifest.

As regards the design of your icon, you should try to make it match as muchas possible the style used by the built-in Android applications.

5. Turn off logging and debugging and clean up data/files

For release, you should make sure that debug facilities are turned off andthat debug and other unnecessary data/files are removed from your applicationproject.

  • Remove the android:debuggable="true" attribute from the element of the manifest.
  • Remove log files, backup files, and other unnecessary files from theapplication project.
  • Check for private or proprietary data and remove it as necessary.
  • Deactivate any calls to Log methods in the sourcecode.

Before you do the final compile of your application

6. Version your application

Before you compile your application, you must make sure that you have defineda version number for your application, specifying an appropriate value for boththeandroid:versionCode and android:versionNameattributes of the element in the application'smanifest file. Carefully consider your version numbering plans in the context ofyour overall application upgrade strategy.

If you have previously released a version of your application, you must makesure to increment the version number of the current application. You mustincrement both theandroid:versionCode andandroid:versionName attributes of theelement in the application's manifest file, using appropriate values.

For detailed information about how to define version information for yourapplication, seeVersioning Your Applications.

7. Obtain a suitable cryptographic key

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, theapplication is properly versioned, and you've cleaned out extra files andprivate data, as described above.

Before you sign your application, you need to make sure that you have asuitable private key. For complete information about how to obtain (or generate)a private key, seeObtaining a Suitable Private Key.

Once you have obtained (or generated) a suitable private key, you will use itto:

  • Register for a Maps API Key (see below), if your application uses MapViewelements.
  • Sign your application for release, later in the preparation process

8. Register for a Maps API Key, if your application is usingMapView elements

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 GoogleMaps service and obtain a Maps API Key, before your MapView(s) will be able toretrieve data from Google Maps. To do so, you supply an MD5 fingerprint of yoursigner certificate to the Maps service.

During development, you can get a temporary Maps API Key by registering thedebug key generated by the SDK tools. However, before publishing yourapplication, you must register for a new Maps API Key that is based on yourprivate key.

If your application uses MapView elements, the important points to understandare:

  1. You must obtain the Maps API Key before you compile yourapplication for release, because you must add the Key to a special attribute ineach MapView element —android:apiKey — in yourapplication's layout files. If you are instantiating MapView objects directlyfrom code, you must pass the Maps API Key as a parameter in the constructor.
  2. The Maps API Key referenced by your application's MapView elements must beregistered (in Google Maps) to the certificate used to sign the application.This is particularly important when publishing your application — yourMapView elements must reference a Key that is registered to the releasecertificate that you will use to sign your application.
  3. If you previously got a temporary Maps API Key by registering the debugcertificate generated by the SDK tools, youmust remember to obtain anew Maps API Key by registering your release certificate. You must then rememberto change the MapView elements to reference the new Key, rather than the Keyassociated with the debug certificate. If you do not do so, your MapViewelements will not have permission to download Maps data.
  4. If you change the private key that you will use to sign your application,you must remember to obtain a new Maps API Key from the Google Mapsservice. If you do not get a new Maps API Key and apply it to all MapViewelements, any MapView elements referencing the old Key will not have permissionto download Maps data.

Compile your application

When you've prepared your application as described in the previous sections,you can compile your application for release.

After you compile your application

9. Sign your application

Sign your application using your private key and thenalign it with the zipalign tool. Signing your applicationcorrectly is critically important. Please seeSigning Your Applications for complete information.

10. Test your compiled and signed application

Before you release your compiled application, you should thoroughly test iton the target mobile device (and target network, if possible). In particular,you should make sure that any MapView elements in your UI are receiving mapsdata properly. If they are not, go back to Register for aMaps API Key and correct the problem. You should also ensure that theapplication works correctly with any server-side services and data that you areproviding or are relying on and that the application handles any authenticationrequirements correctly.

After testing, you are now ready to publish your application to mobile deviceusers.


更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android(安卓)编译错误::app:transformCl
  2. 一点见解: Android事件分发机制(一)
  3. android cts测试失败项以及原因
  4. android 用到的技巧集
  5. Android(安卓)- LayoutInflater 的使用
  6. Android弹球小游戏
  7. android 用到的技巧集
  8. android 学习笔记10——XML解析
  9. Android之SurfaceView、Camera
  10. android 监听电源键