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
- Go to the Google Firebase console at (https://console.firebase.google.com/)
- Create a new project if you currently have none.
- Click the Settings icon and select Project Settings.

- If not already added, add your Android app to the project, and download the
google-services.json
config file associated with that app.

- Go to Settings > Cloud Messaging where you will find the Server key and Sender ID.

Configure Xtremepush
-
In Xtremepush, go to Settings > Apps & sites > click on the matching Android app > Push Settings
-
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
- 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'
- Add the following to your module-level
build.gradle
file:
apply plugin: 'com.google.gms.google-services'
- Finally, add the
google-services.json
you downloaded to your project/app folder:

Updated over 1 year ago