All Android apps submitted to Google Play and the Amazon Store have to be signed with a certificate before they can be installed. Android uses this certificate to identify the author of an app. This article will walk you through the process of generating a Keystore file and entering the information into the right location in the mag+ Publish portal.
When you are done generating the Keystore file, you will have the following items:
- A Keystore file: This can be thought of as a collection of individual items, called keys (public and private), that are paired together to create a certificate which is embedded in your app.
- A key alias: A reference to an individual pair of keys.
- A key alias password: A password associated with a pair of keys.
- A Keystore password: A password that protects the Keystore file itself.
Unlike iOS Certificates, Keystore Files do not expire, so you do not need to renew them yearly.
Note: You can use the same Keystore file for all of your Android applications. This is,in fact, recommended by Google.
Before You Begin
- (Windows users only) Make sure you have a Java SDK installed on your machine.
- Create a folder somewhere on your machine where you will generate your Keystore file.
How to Create a Keystore File on a Mac
1. Start the Terminal application and go to the folder you created which will hold your Keystore file.
Important Information
- In the screenshot below, the folder we are sitting in is called "Android Keystore files."
- To go to a folder in Terminal, you can type 'cd' and hit the space bar and then drag the folder into the Terminal window.
2. Enter the command listed below and hit return, replacing the text "key_alias" with something of your choosing.
The command to enter is:
keytool -genkey -v -keystore my-release-key.keystore -alias key_alias -keyalg RSA -keysize 2048 -validity 10000
Since the same Keystore should be used for all Android apps, you can use the syntax "your_company_name_android_key_alias." In this example, we will use "magplus_android_key_alias."
Note: Do not use spaces or special characters in your key alias.
3. Follow the prompts and fill out the information requested.
Note: Be sure to make note of your key alias, key alias password, and Keystore password as you will need to enter those items in the mag+ Publish portal.
4. Find the "my-release-key.keystore" file in your folder and append the extension ".file" to it.
Note: Be sure to save this file, your keystore password, keystore alias, and keystore alias password in a safe place for future use.
5. Now login to the mag+ Publish portal <https://publish.magplus.com> and go to Apps > Android > Build Settings.
How to Create a Keystore File on a PC
To create a Keystore file on a PC, please refer to the Android Developer documentation on signing your applications. The specific section to read is "Signing Your App Manually." You can refer to the directions above on where to enter the Keystore file, key alias, key alias password, and keystore password in the mag+ Publish portal.
App Creation: Next Steps
Your Android app now has the appropriate certificate associated with it. However, there are additional steps to complete before you publish your app. You must create content to include within the app, customize the app's look and feel to match your brand, and then you must build your app and upload it to the Google Play Developer Console. For more information on these items, please look at the other articles in our knowledge base.
0 Comments