how release your ANDROID application : Signing Your Applications

17:18:00 Dhaval Sodha Parmar 0 Comments

All Android applications must be signed before they are allowed to be deployed onto a device (or emulator). Unlike other mobile platforms, you need not purchase digital certificates from a certificate authority (CA). Instead, you can generate your own personal certificate and use it to sign your Android applications. 

The Android build process signs your application differently depending on which build mode you use to build your application. There are two build modes: debug mode and release mode. You use debug mode when you are developing and testing your application. You use release mode when you want to build a release version of your application that you can distribute directly to users or publish on an application marketplace such as Android Market.

To sign your application manually, you need to perform the following steps: 

Compile your application in release signing mode. To do so in Eclipse,

Save your file:

  • If you wish to sign your application using the debug keystore, copy the Debug.keystore file from C:\Documents and Settings\\Local Settings\Application Data\Android\ to C:\Program Files\Java\jdk1.6.0_10\bin\.
  • Use the jarsigner.exe tool (comes with your JDK) located in C:\Program Files\Java\jdk1.6.0_10\bin\ to sign the .apk file with the specified keystore: 
     jarsigner -verbose -keystore debug.keystore AppSMS.apk androiddebugkey

  • To verify that the application is signed correctly, you can use the –verify option with jarsigner.exe.

  • Once your Android application is signed, you can deploy them to emulators and devices using the adb.exe tool 
  • Signing your application is absolutely essential if you want your application to run beyond the emulator. This is particularly true if you wish to publish your application on the Android Market.