Android push notifications

Configure push notifications within Xtremepush and your app

To send push notifications on Android you need to have a Firebase Cloud Messaging Server key and Sender ID. Follow these steps to generate these and enable push notifications in both the Xtremepush platform and your Android app.

Get configuration values

  1. Go to the Google Firebase console at (https://console.firebase.google.com/)
  2. Create a new project if you currently have none.
  3. Click the Settings icon and select Project Settings.
1262
  1. If not already added, add your Android app to the project, and download the google-services.json config file associated with that app.
1003
  1. Go to Settings > Cloud Messaging where you will find the Server key and Sender ID.
2491

Configure Xtremepush

  1. In Xtremepush, go to Settings > Apps & sites > click on the matching Android app > Push Settings

  2. Copy the Sender ID and Server key into the appropriate fields and press Save.

❗️

Any subscribed users are opted-in against your Sender ID on Firebase. If you change the Sender ID of an existing integration you will lose your current subscribers.

Add to app

  1. Add these libraries to your project-level build.gradle file:
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.3.3'
  1. Add the following to your module-level build.gradle file:
apply plugin: 'com.google.gms.google-services'
  1. Finally, add the google-services.json you downloaded to your project/app folder:
468