Configure Android build for push notifications

On AppMySite, you can send unlimited push notifications to your app users. To send notifications to your app users, it is mandatory to enable notifications while before your app build. 

The following sections explain the process of enabling push notifications on your Android app:

Generate Firebase Server key and Configuration file

The following points explain how to generate the Firebase Server Key and Configuration file. 

  • Sign in to your Google Firebase account. If you have a Gmail ID, you can simply sign in with your email ID from here.
  • After logging in, create a new project for your mobile app.

Read: Create a Firebase project

  • After setting up your Google Analytics, your project will be created and you will arrive on your Firebase dashboard.
  • Click on the Android icon on the main screen. You will be next directed to a new page. Enter your Android package name (copy the bundle ID from your AppMySite account) and app name. You can skip the step to add the SHA-1 key.
  • Click on Register app when you’re done entering the info.
  • Download the google-services.json file. 
  • Click on the Settings icon in the left panel on the top left and select Project Settings. Navigate to the Cloud Messaging tab.
  • Enable Cloud Messaging API (Legacy). This will be disabled by default. To do this, click on the three-dot menu in this section and select Manage API in Google Cloud Console. You will be redirected to Google Cloud Console where you can simply enable the Cloud Messaging API (Legacy).
  • Go back to the Cloud Messaging tab and refresh the page. You will now see the Firebase Server key.
  • Copy the Firebase Server key. It will be available under Project Credentials.

Enable push notification while creating the build

Follow the steps below to enable push notifications for your Android users:

  • To send push notifications to your app users, log in to your AppMySite account and go to Download from the side menu.
  • Select the Build Android app button under Android. If you already have a live app on Google, select the Rebuild app button.
  • You will be directed to the Android build configuration screen. Copy the bundle ID from the top right of the screen.
  • Turn on the Enable push notifications toggle. 
  • Enter the Google Firebase Server Key and Google Firebase Configuration file.
  • Click on Build app to generate your Android app build.

Watch our video tutorial to configure push notifications in your Android build.

Related Articles