Android build configuration

How to configure your Android build for push notification?

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:

Step 1: Enable notification settings

  • Navigate to the Notification Build Settings screen in your AppMySite dashboard.

  • Turn on the toggle for the type of notifications you want to configure:

    • Basic notifications

    • Advanced notifications

    • Both

  • Click on Generate in the SHA-1 key field.

Step 2: Set up Google Firebase

  • Navigate to Google Firebase and create a new project if you haven’t already set one up during the iOS build configuration.

Refer to the guide to learn how to create a Firebase project.

Create 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.

Step 3: Upload Firebase configuration files

  • 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.

Step 4: Generate a new Android app build

  • Once the configuration is complete, create a new build of your Android app.

  • Download and install the new build on a test device to verify that push notifications work correctly.

Important

This setup ensures that your app is configured to send push notifications efficiently using Firebase.

Last updated

Was this helpful?