Configuring an Android application to send push notifications

  1. Step 1. Create a project in Firebase
  2. Step 2. Configure AppMetrica to work with FCM

Step 1. Create a project in Firebase

  1. Go to the Firebase Console and choose an action:

    Create a new project (if this is your first project)
    1. Enter a name for the project.
    2. Select the country your organization is officially registered in and click Create project.
    Import a Google project (if you used Google APIs to create a project)
    1. In the drop-down list, select the name of the project you are planning to run push campaigns for.
    2. Select the country your organization is officially registered in and click Add Firebase.
  2. Click Add Firebase to your Android app and follow the instructions.

Step 2. Configure AppMetrica to work with FCM

Get a server key for using Firebase Cloud Messaging:

  1. In the Firebase Console, select the project you are planning to run push campaigns for.
  2. In the menu on the left, click next to the project name and go to the Project settings section.
  3. Go to the Cloud Messaging tab.
  4. In the Project keys section, copy the Server key value.

Use this key in the AppMetrica interface:

  1. In the Applications section, select the app that you want to run push campaigns for.
  2. In the menu on the left, select Settings.
  3. Go to the Push notifications tab.
  4. In the Android section, enter the value you copied from the Firebase Console in Server key and click Submit.