Android build configuration
Last updated
Was this helpful?
Last updated
Was this helpful?
Send push notifications from within your app dashboard. To send notifications for your app, it is mandatory to configure your app build. Here’s a step-by-step guide on how to set it up for Android:
Navigate to the Notification Build Settings screen in your AppMySite dashboard.
Turn on the toggle for the type of notifications you want to configure:
Plain notifications
Rich notifications
Both
Click on Generate in the SHA-1 key field.
If you’re configuring plain notifications only, you do not need to generate an SHA-1 key.
Navigate to Google Firebase and create a new project if you haven’t already set one up during the iOS build configuration.
If you have already set up a Firebase project for iOS notifications, you must use the same project for Android.
Refer to the guide to learn how to create a Firebase project.
On the Project Overview screen, click on Add app and select Android.
Next, you’re required to enter your app package name. Navigate back to your AppMySite app dashboard and copy your Android app’s package name.
After adding your package name, enter a nickname for your app.
Paste the SHA-1 key you generated earlier on the Build Settings screen on AppMySite.
After proceeding to the next step, download the google-services.json file. Click on next again to complete the process.
Next, click on the gear icon next to Project Overview and select Project settings.
Navigate to the “Service accounts” tab.
Click on Generate new private key. Make sure node.js is selected. The key would be downloaded as a json file.
Your google-services.json file is essential for Firebase integration. Keep it safe, as you will need it for the next step.
Return to the Notification Build Settings screen in your AppMySite account.
In the Google Firebase Configuration field, upload the google-services.json file.
In the Google Firebase Service Account field, upload the .json key file.
Click Save to complete the setup.
Make sure you upload the correct Firebase configuration files to avoid connectivity issues.
Once the configuration is complete, create a new build of your Android app.
If you are enabling only plain notifications, you do not need to generate the SHA-1 key.
Download and install the new build on a test device to verify that push notifications work correctly.
Once your new build is live, notifications will start working automatically.
If you face any issues, verify that you have uploaded the correct Firebase configuration files.
You must rebuild and submit a new version of your app every time you modify notification settings.
This setup ensures that your app is configured to send push notifications efficiently using Firebase.