Skip to content

Configuring Push Notifications

Defining Push Notifications

Configure push-related settings for the selected application.

Use native push to send push notifications. The push listener service provided with SAP Cloud Platform Mobile Services allows back-end systems to send native notifications to devices. Application developers must enable push notification code in applications. You can also use the native push mechanism to push notifications to a subset of users.

Note

Text message (SMS) support is not available.

For the selected application, select Mobile Push Notification under Assigned Features (or add it first).

  • Select Configuration to configure push notifications.

  • Select Push Registrations to view current registrations and send push notifications. See Sending Push Notifications to send a message.

  • Select Service Keys to view and manage API keys. See Sending Notifications via the REST API to send push messages from back-end systems.

  • Select Info to view feature details and to download mobile service data in JSON format.

Firebase Cloud Messaging Canonical IDs

For Firebase Cloud Messaging (FCM) clients, canonical IDs prevent problems that could occur if a client application inadvertently triggers multiple registrations for the same device; for example, the device could receive duplicate messages.

If a FCM client application sends a message that contains an old registration ID, FCM processes the request and inserts the canonical ID into the registration_id field of the response.

SAP Cloud Platform Mobile Services:

  • Replace the old registration ID that is stored for the device with the canonical ID.

  • Use the canonical ID for sending messages to the device.

  • Log a customer event to inform the client of updated or deleted device registrations that result from managing canonical registration IDs.

Enabling Preconfigured Push

Enable or disable preconfigured push settings for SAP Mobile Cards and SAP Fiori Client.

  1. In Mobile Services cockpit, select Mobile Applications.

  2. Select an application, then select Mobile Push Notification under Assigned Features (or add it first); for SAP Mobile Cards select Features > Push Notification

  3. For a native/hybrid app, under Predefined Global Push Configuration, select Predefined for SAP Fiori Client.

    Note

    Predefined push is only supported for the app store version of SAP Fiori Client for iOS and Android.

  4. For SAP Mobile Cards, under Predefined Global Push Configuration, Enable Push for SAP Fiori Client

  5. Click Save.

Configuring Push for Android Apps

To enable client applications to receive Firebase Cloud Messaging (FCM) notifications, configure Android push notifications.

  1. In Mobile Services cockpit, select Mobile Applications.

  2. Select an application, then select Mobile Push Notification under Assigned Features (or add it first); for SAP Mobile Cards select Features > Push Notification

  3. Under Android, enter the access key for Server Key. This is the access key you obtained for your Google API project (https://firebase.google.com/docs/cloud-messaging).

  4. Enter a value for Sender ID. This is the project identifier.

Configuring Push for iOS Apps

Configure APNS push notifications for the selected iOS client application or SAP Mobile Cards.

You can use either certificate or token-based authentication for APNS. The advantage of using token-based authentication is that the credentials do not expire automatically, whereas APNS certificates usually expire after one year. You can manually control the lifecycle of the key used for token-based authentication in developer.apple.com. Obtain the credentials used for token-based authentication from your developer account on developer.apple.com.

  1. In Mobile Services cockpit, select Mobile Applications.

  2. Select an application, then select Mobile Push Notification under Assigned Features (or add it first); for SAP Mobile Cards select Features > Push Notification.

  3. To configure APNS for a development and testing environment, select Sandbox; to configure APNS for a production environment, select Production. Choose either Certificate or Token-Based as the authentication type. (Optional) If you don't want to receive APNS push notifications, under Apple, select None.

    For Certificate:

    1. Select Browse to navigate to the APNS certificate file, select the file, and click Open.

    2. Enter a valid password.

    3. (Optional) Identify the topic bundle ID that is specific to the iOS application you're setting up to receive notifications. If not configured, the bundle ID is extracted from the certificate. For Token-Based:Token Properties
    Property Description
    Topic (Bundle ID) The bundle ID that is specific to the iOS application you're setting up to receive notifications.
    Team ID The 10-character team ID you use for developing your company's apps. Obtain this value from your developer account.
    Key ID The 10-character string that is provided by Apple when you create a key.
    Key (P8) The authentication token signing key (.p8) file that you've downloaded from Apple. Select Browse to navigate to the APNS key file, select the file, and click Open.
  4. Save your changes.

Configuring Push for China

Baidu provides a new push notification routing service for users in China. To enable this feature, configure Mobile Services to connect to the service.

Subscribe to the Baidu service and obtain Baidu account credentials that include an API key and a secret key.

Because Google services are blocked in China, SAP uses Baidu to send push notifications to users.

  1. In Mobile Services cockpit, select Mobile Applications.

  2. Select an application, then select Mobile Push Notification under Assigned Features (or add it first); for SAP Mobile Cards select Features > Push Notification

  3. Under Baidu, select Enable push to Android devices or Enable push to iOS devices. You can push to both Android and iOS devices simultaneously by selecting both the options.

  4. Specify the API Key and Secret Key.

  5. Save your changes.

Sending Push Notifications

Manage push notifications for the selected application.

This feature uses the existing push notification mechanism, but enables you to create messages to send to recipients. You can send a native push notification. The feature requires you have the Notification User role to send push notifications (if the Send Push Notification button is disabled, the role needs to be added to your profile). Built in security ensures that you must wait a minute between sending notifications, to prevent spamming users. Even if you click Cancel to stop a message, you must wait the full minute before sending the next one.

  1. In Mobile Services cockpit, select Mobile Applications > Native/Hybrid or SAP Mobile Cards

  2. Select an application, then select Mobile Push Notification under Assigned Features (or add it first); for SAP Mobile Cards select Features > Push Notification.

  3. Select Push Registrations to see a list of registered users who are eligible for push notifications.

    You can click the Customize Table Columns icon action-settings to change the columns that appear.

    Registered Users Default Columns

    Category Description
    User Name User name of the registered user.
    Device ID The device type for the registered user, such as Android or IOS.
    Push Provider The push provider associated with the device.
    Push Group The push group associated with the device.
    Created At (UTC-700) The time the device registered in UTC format.
    Actions Indicates any actions you can take for the registered user, such as sending a notification, or deleting the registration.
  4. You can use the filters to help find a subset of registered users.

    Filter Criteria

    Filter Description
    User Name Enter a specific user name, or the start of a user name.
    User Locale Enter the language. This field is not validated, so you can enter any string value. Use the field if you know one or more values that users entered during registration, such as EN or German.
    Time Zone Enter one or more time zones, separated by commas. This field is not validated, so you can enter any string value. Use the field if you know one or more values that users entered during registration, such as UTC-1 or PST.
    Device Model Select one or more device model, such as iOS and Android.
    Push Group Enter a push group name. This field is not validated, so you can enter any string value. Use the field to create an ad hoc group for filtering. Push groups do not persist.
    Registration Timeframe Select a time frame from the list: Last 24 Hours, Last 7 Days, Last 4 Weeks, Last 3 Months, Last 6 Months, Last 12 Months, or Custom Defined (use the date-time picker to define a range).
  5. Select Send Notification to send a push notification to a registered user. In Send Push Notification, type your message and select Send. The native push notification was sent successfully. appears.

  6. Select delete to remove a registered user from the push notification list.


Last update: August 12, 2020