Configuring your app

For using Firebase

Stage 1. Create a project in Firebase and obtain a key

  1. Go to the Firebase Console, click Get started with a Firebase project, and create a project.

    Note

    If you already have a project, go to Project settings and follow the guide starting from Step 3.

  2. Go to Your ProjectProject settings.

  3. In Project settings, go to the Service accounts tab and click Generate new private key.

  4. In the window that opens, click Generate key. The key will be downloaded as a JSON file. Save it: you will need it for AppMetrica.

  5. Please make sure the Firebase Cloud Messaging API (FCM API) is enabled. If not, enable it:

    1. Go to https://console.cloud.google.com/apis/library/fcm.googleapis.com.

    2. Select your project and check the status of the FCM API.

    3. If your FCM API is disabled, click Enable.

Stage 2. Add your key in the AppMetrica interface

Add the key obtained in Stage 1 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, next to FCM service account key, click Select file and upload the key (JSON file) obtained from Firebase.

To use Huawei Mobile Services (HMS)

Stage 1. Create and configure a project in the Huawei console

Follow all the stages in the Huawei documentation.

Alert

Make sure that Configuring the Signing Certificate Fingerprint specifies SHA-256 certificate fingerprint for all app signatures, including the debug version. Otherwise, the device can't receive push notifications.

Stage 2. Configure AppMetrica to work with HMS

Get the app ID and app secret from the Huawei console:

  1. In the list of projects in the Huawei console, select your project.
  2. On the project page, copy the App ID and App secret field values.

Use these keys in the AppMetrica interface:

  1. In the Applications section, select the app 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 Huawei block, fill in the App ID and App secret fields with values from the Huawei console and click Submit.

See also

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support