Friday, October 31, 2014

Android Signing apes using Android Studio

Signing in Debug mode 
In debug mode, the apps are signed with a debug certificate generated by the SDK tools. This certificate has private key with a known password, which enables developer to run and debug app without entering the password every time we make change to the application. 

Android studio and Eclipse IDE automatically sign the project when running from these tools. But this cannot be distributed as we expect. 

Signing in release mode. 
In release mode, developer sign using his own certificate. Below are the steps

- Create a Keystore: A keystone is a binary file that contains set of private keys. Developer must keep keystore in a secure place. 
- Create a private key: A private key represents the entity to be identified with the app. such as a person or company. 
- Build the project : Generate the unsigned APK of the app 
- Sign the app: Using the private key, generate the signed version of the app. 

After the above step, the app can be distributed in the store. 

Signing wearable apps
When publishing wearable apps, developer needs to package wearable app inside of a handheld app and both must be signed. 

In the Android studio, there is a utility to create the Keystore and store key and password into it. 
This can be accessed using Build > Generate Signed APK
On the Signed APK wizard, need to click on Create new
store the keystone in a known private path in the system, provide the key and password to store in the store. 

This creates the APK. 

References:

No comments:

Post a Comment