Code Modifications (Hybrid)

  1. (Android only) If your target platform is Android:
  • For Mobile SDK 12.0 and later, Add a Firebase Configuration File as described in the Google Firebase docs.

  • For Mobile SDK 11.1 and prior, add an entry for androidPushNotificationClientId.In assets/www/bootconfig.json:

    This value is the project number of the Google project that is authorized to send push notifications to an Android device.

  1. In your callback for cordova.require("com.salesforce.plugin.oauth").getAuthCredentials(), add the following code:

This code demonstrates how you might handle messages. The server delivers the payload in message["payload"].