No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Enabling Push Notifications in a Salesforce Mobile SDK Android App
- Add an entry for androidPushNotificationClientId.
- In res/values/bootconfig.xml (for
native apps):
- In assets/www/bootconfig.json (for
hybrid apps):
This example value represents the project number of the Google project that is authorized to send push notifications to Android devices.
- In res/values/bootconfig.xml (for
native apps):
- Create a class in your app that implements PushNotificationInterface. PushNotificationInterface is a Mobile SDK Android interface for handling push notifications. PushNotificationInterface has a single
method, onPushMessageReceived(Bundle message).
In this method you implement your custom functionality for displaying, or otherwise disposing of, push notifications.
- In the onCreate() method
of your Application subclass,
call the SalesforceSDKManager.setPushNotificationReceiver() method, passing in your implementation of PushNotificationInterface. Call this method immediately
after the SalesforceSDKManager.initNative() call.