Step A: Enable Firebase Cloud Messaging for Mapp Cloud

How to Enable Firebase Cloud Messaging in your Android app


SDK Versions

Download the latest SDK files here: Initialize Android Mapp SDK for Mapp Cloud

This procedure is broken down into two parts:
  1. Enable Firebase for your app and generate the necessary IDs (API key and Sender ID).
  2. Enter the proper IDs (API key,google-services.json and Sender ID) in the Firebase Play Developer Console to link them to your app.


How to Enable Firebase Cloud Messaging (FCM) in the Firebase Developers Console

1. Login to the Firebase Developers Console at <https://console.firebase.google.com>.

2. Click "Create a Project."


3. Enter your Project name.

The "Project name" can be anything you want to name it, we recommend naming it something similar to your app's name to make it easily identifiable for later if necessary.
Review configuration and continue with creating new project.
 
Choose existing or create new Google Analytics account:

Project is successfuly created and can be used.

4. After the project is created, click the settings "gear" icon in the upper left and select "Project settings".


5. Click on the "Service Accounts" tab.

On this page, you will find your button "Generate new private key". Click this button to generate and download service account key in JSON format. This key will need to be forwarded to the MAPP, to provide push messaging functionality. 

6. Add Firebase to your Android app.


7. Configure the Firebase Android app.

8. Add configuration google-services.json to the android application.

Download google-service.json and move into your Android app module root directory.

To make the google-services.json config values accessible to Firebase SDKs, you need the Google services Gradle plugin.

Add the plugin as a dependency to your project-level build.gradle.kts file:


Root-level (project-level) Gradle file (<project>/build.gradle.kts):
plugins {
  // ...

  // Add the dependency for the Google services Gradle plugin
  id("com.google.gms.google-services") version "4.4.1" apply false
}


Then, in your module (app-level) build.gradle.kts file, add both the google-services plugin and any Firebase SDKs that you want to use in your app:

Module (app-level) Gradle file (<project>/<app-module>/build.gradle.kts):
plugins {
  id("com.android.application")

  // Add the Google services Gradle plugin
  id("com.google.gms.google-services")

  ...
}

dependencies {
  // Import the Firebase BoM
  implementation(platform("com.google.firebase:firebase-bom:33.0.0"))


  // TODO: Add the dependencies for Firebase products you want to use
  // When using the BoM, don't specify versions in Firebase dependencies
  implementation("com.google.firebase:firebase-analytics")


  // Add the dependencies for any other desired Firebase products
  // https://firebase.google.com/docs/android/setup#available-libraries
}

After adding the plugin and the desired SDKs, sync your Android project with Gradle files.


Congratulations! You have now successfully enabled Firebase Cloud Messaging (FCM) and linked it to your Android app.


Now, continue to Step B: Enable Android Channel in Mapp CloudÂ