Skip to Content

Send Notifications to Your Android Application

Add foreground and background notifications to your application using Google Firebase.
You will learn
  • How to configure SAP BTP for push
  • How to configure Mobile Services for push
  • Foreground notifications
  • Background notifications
flyingfish162Bruce MengMarch 31, 2025
Created by
sandeep-tds
January 9, 2023
Contributors
sandeep-tds
flyingfish162

Prerequisites

  • Step 1
    1. Go to SAP Mobile Services Cockpit, navigate to Mobile Applications > Native/MDK and select the btp.sdk.wizapp application.

    2. Select Push Notification.

      If you don’t see the option, follow the screenshots to add this feature:

      • Add assigned features
      • Add push notification
    3. The Push Notification screen requires information from Firebase.

      Push notification
    4. In the Firebase console, select project Wiz App, and then go to Project settings.

      Project settings
    5. Select the Service accounts tab and click Generate new private key button. Then click Generate key in the pop-up window and store the downloaded private key file securely because the key cannot be recovered if lost.

      Generate private key
    6. In the SAP Mobile Services Push Notification settings screen, click Browse… to load the downloaded private key file. After that, click Save to save changes.

      Push notification android

    In the cockpit, which properties are needed to enable Android push messaging in the Push Notification tab?

  • Step 2
    1. Switch to Push Registrations on the Mobile Push Notification settings page.

      Push registrations page
    2. Select certain registration to send notifications.

      Send notification

      It may be difficult to tell which registration to choose. The last field on the page shows the last time a given registration made a request. If you are unsure which registration to choose, navigate through a few screens in the application and then press the GO button to refresh the display, or select all of them and send a greeting to all the registrations.

      If you don’t see the Send Notifications button, try logging out and back into the management cockpit.

    3. Specify the notification text to send to the app.

      Send notification
  • Step 3
  • Step 4

    For further information on push, see Push Notifications, Push API Notification Scenarios, and About FCM Messages.

    Congratulations! You have seen how an app can make use of foreground and background notifications.


Back to top