Developer

Testing Push Notifications

Test the Push and Settings plugins, and troubleshoot any push notification issues.

Prerequisites

Create a Hybrid type application for your Kapsel application in the management cockpit.

Context

Procedure

  1. Open the project in your development IDE.
  2. Build and run the project.
  3. Send a REST request to send a notification to the Kapsel app.
    When sending a push notification using a REST client, make sure that cookies are enabled. Otherwise, you may receive an error while processing the notification.
  4. If using an Android emulator for push notification testing, select Google API SDK 19 or above.

    For information on sending notifications, see Notification Data Sent Through HTTP Headers in REST API Application Development.

Troubleshooting Push Notifications

To troubleshoot push notifications:

  1. Check whether the device is registered with the SAP Mobile Platform Server successfully (from the cockpit).
  2. For Android, check whether the Kapsel project includes gcm.jar.
  3. Check whether the device is registered for push with the provider (Google or Apple) successfully, then use the REST client to check if a token has been obtained and exchanged with the SAP Mobile Platform Server.
  4. Check whether the proxy settings on the server are correctly set, as SAP Mobile Platform needs an Internet connection to the GCM/APNS server.
  5. Check whether the Notification security provider is correctly set, whose Roles must contain “Notification User”.
  6. Send a test notification using the REST client. A return code of 201 indicates that SAP Mobile Platform and GCM or APNS has no problem.