Prerequisites for Android code sign
- Generating Upload Keystore file
- Generating App Signing Keystore file
- Download Firebase config file and Firebase Service Account file
Generating Upload Keystore file
- Open the Terminal or Command Prompt.
Replace <my-release-key> and <alias_name> with the upload keystore file name and alias name, respectively, then:
keytool -genkeypair -v -keystore <my-release-key>.keystore -alias <alias_name> -keyalg RSA -keysize 2048 -validity 20000 -storetype jksYou will be prompted to set your Keystore password.
- Set your Keystore password and memorize it. You'll need this again when you code sign your app for Android.
- Enter the details as prompted.
- Set your Key password:
- Enter the required password, or
- Press the RETURN or ENTER key in your keyboard to set the Keystore password as the Key password
The Upload Keystore file will be generated and downloaded in the path where you executed the above commands.
Generating App Signing Keystore file
- Open the Terminal or Command Prompt.
Replace <my-release-key> and <alias_name> with the app signing keystore file name and alias name, respectively, then:
keytool -genkeypair -v -keystore <my-release-key>.keystore -alias <alias_name> -keyalg RSA -keysize 2048 -validity 20000 -storetype jksYou will be prompted to set your Keystore password.
- Set your Keystore password and memorize it. You'll need this again when you code sign your app for Android.
- Enter the details as prompted.
- Set your Key password:
- Enter the required password, or
- Press the RETURN or ENTER key in your keyboard to set the Keystore password as the Key password
The App Signing Keystore file will be generated and downloaded in the path where you executed the above commands.
Download Firebase config file and Firebase Service Account file
1. Download Firebase Config file
- Sign in to your Firebase console.
- Select the required project. If you haven't created a project yet, then:
- Click the Settings icon, then select Project settings.
- Navigate to the General tab.
- In the Your apps card, select the package name of the app for which you need a config file.
- Click the google-services.json button. Your Firebase config file will be downloaded to your device.
2. Download Firebase Service Account file
- Access your Firebase console.
- Select the required project.
- Click the Settings icon, then select Project settings.
- Navigate to the Service accounts tab and click Generate New Private Key. A confirmation popup will be shown, and the Firebase Service Account file will be downloaded once you confirm it.
- Securely store the JSON file containing the key and upload it your Creator account to enable push notification.