Mobile App Development has got significant importance in recent years. Most of the businesses have developed mobile apps to promote their business and in turn increased their sales and profit. There are various Mobile Apps Development platforms including Android App Development, iOS App Development, Windows App Development and Blackberry App Development. Companies around the world can make use of Custom Mobile Application Development Services to keep their Businesses stay ahead of competitors in the digital technology era.
With Android App Deployment, one of the challenges developers faced is to handle deployment keys in play store console. In this article we are going to discuss how to handle deployment keys for Android app using Google’s App signing method. So, you are done developing your shiny new Android application and ready to deploy this to Google Play Store.
Handling the Deployment of Android Apps in Google Play Store Console
If you have ever generated and signed the APK yourself, it was your responsibility to keep the key store safe for future updates. If you ever lose the key store file, you are screwed; you cannot deploy a new version of the same application. Your only option at that point was to create a new application and lose all the previous reviews and ratings associated to the current app. To overcome this problem Google has introduced a new App signing method that preserves the key store file on the play store and relieves the developer from storing the key store file locally and keeping it safe.
Google New App Signing Method – Android App Bundle
Google has introduced new option in the Android Studio to generate Android App Bundle.
Step 1: Create Upload Key
Figure 1 shows the new option in the Android Studio.
Now select the android app bundle and press next and you will see the following screen.
Notice in Figure 2 there is a new option (Export encrypted key). Just select this option and proceed with Next button and then select Finish button.
After this process, android studio will generate two files.
- Android App Bundle file with extension .aab in the selected destination folder.
- Private key with extension .pepk in the C:\Users\xxxxxxx\.android path.
Step 2: Prepare your release in Google Play Console
- Go to the Google Play Console.
- Select an app.
- On the left menu, select Release management > App releases.
a. If you have created a new application then in Next to “App signing by Google Play,” select Accept.
b. If you want to enable Google App signing for already existing applications, then select upload a key exported from Android Studio and then press App Signing Private Key to upload *.pepk private key file. Once the private key is uploaded, the Google App Signing option is enabled. Now you can use App bundle package.
- On the left menu, select App signing. You can see the App signing certificate and Upload certificate.
a. For new applications, both certificates will be different.
b. For existing applications, after enabling App signing feature from step 3, you will notice that these certificates will be the same.
c. To configure Google Maps in Google Console API dashboard, it’s better to use both SHA1 certificates fingerprints so that Google map can work properly because, in debug build, the Google map will be executed using upload key (generated by Android studio) but in released build the Google map will be executed using App signing certificate. Sometime, developers only configure upload certificate and not the App signing certificate which results into Google Map not loading in Android App in release mode.
The main benefit of the Android App Bundle is that Google will re-sign the APK with deployment key and will generate APKs as per device configuration. See the following figure in Release Management > Production > App Bundle Explorer.
In this way, APK according the device capability will be downloaded. The APK download size will be reduced as well.
Asif Javaid Chughtai is Principal Software Engineer at Techliance, a United States based Custom IT Services Company. He has a keen interest in Android and MS .Net framework development. He occasionally writes on Techliance Blog and other forums. If you have any questions or comments on this article you can write to him at email@example.com for sure.