Android Setup

FCM Setup

The Rover Campaigns app uses Google's Firebase Cloud Messaging to deliver notifications to your app. In order to authorize Rover communication with your app through FCM you will need to create an FCM project and upload its "Server key" to Rover.

Setting up Firebase and Play Services

Head to the Firebase Console and ensure you are logged in with an appropriate Google account for your project. Select "Add a new project", or, if you have already created one, select it. Welcome to Firebase screen

On the project "Getting Started" page, you can then select "Add Firebase to your Android app".

Getting Started screen on Firebase

Fill in your app’s package name and visible name.

Add Firebase to your Android app

Press "Register App". Google will then direct you to download a google-services.json file, drop it into your Android project’s file tree, and then direct you to add the Firebase SDK to your app’s build.gradle files.

Build Variants with Different Package Names

If you use separate package names for prod/debug builds, then you can repeat this process to create multiple apps for each package name within the single project. The same google-services.json file will work properly for both.

Connect Rover to Firebase Cloud Messaging

You will then need to retrieve the Firebase Web API key and set it on your Rover account so that Rover can push notifications through to your app via Firebase.

Click on the gear icon adjacent to "Project Overview" and select Project Settings. Firebase Project Overview

Click the Cloud Messaging tab to view the Server Key. Copy it to your clipboard.

Firebase Cloud Messaging Settings

Go to the Rover Settings app, then click on the "Push Configuration" tab. Then set the Server Key you copied to your clipboard from Firebase in the second step, into the "FCM Server Key" field. Finally, click "Save".

Set Server Key

At this point Rover can deliver push notifications meant for your app to FCM. However, to set up your app and the Rover SDK to receive and handle them, you will need to proceed to the next step, Push Notifications.