Skip to content

Push Notification Setup (Android)

Backendless can deliver published messages as push notifications to Android devices. Additionally, Backendless Console can be used to publish push notifications. In order to deliver a push notification to Android, your app must be configured to use Firebase Cloud Messaging the Backendless backend must be configured with a Google API Key. Detailed instructions for setting up FCM in your app can be found at:, however, make sure to follow the instructions below as well.

  1. Login to Firebase Console and select or create a project.
  2. Click the Add Firebase to your Android app icon and follow the on-screen instructions. Make sure to download google-services.json when prompted.
  3. Add Firebase SDK to your project per Google's instructions (step 3 in the process of adding Firebase to your Android app).
  4. Make sure the following dependencies are present in application's file (usually app/build.gradle). Note that the version numbers will change, the numbers in the example below is the latest version at the time of this doc writing:

    implementation ''
    implementation ''

  5. Click the gear/settings icon located next to the Project Overview menu item and select Project Settings.

  6. Click the CLOUD MESSAGING tab:
  7. The Cloud Messaging tab displays project credentials. Make sure there is a Server Key generated for the project. Copy Server key: (do not use Legacy server key):
  8. Open Backendless Console and select your application.
  9. Click the Manage icon in the upper left corner and select the MOBILE tab.
  10. Click the ADD KEYS button in the Android Server Keys section.
  11. Paste the Google Server key in the Secret key field. Make sure to map the key to a Backendless messaging channel. If you would like to use the key for all channels, use the All channels checkbox:
  12. Click SAVE. At this point the backend is configured and is ready to publish push notifications to Android devices registered with your Backendless backend.

App/Manifest Configuration

  1. Make sure to add Backendless SDK to your app per the documentation instructions.
  2. Backendless service for Android must be registered in the app's manifest as shown below:

    <service android:name="com.backendless.push.BackendlessFCMService">
        <action android:name="" />

  3. Use the device registration API. For example, the following API registers the device with both FCM and Backendless. It uses the Backendless default messaging channel:

    List<String> channels = new ArrayList<String>();
    channels.add( "default" );
    Backendless.Messaging.registerDevice(channels, new AsyncCallback<DeviceRegistrationResult>() {
        public void handleResponse(DeviceRegistrationResult response) {
            Toast.makeText( context, "Device registered!",
        public void handleFault(BackendlessFault fault) {
            Toast.makeText( context, "Error registering " + fault.getMessage(),

  4. You can verify device registration in your Backendless backend. To do open Backendless console and navigate to the Data screen. The  device will appear in the the DeviceRegistration table: