java.lang.Object | |
↳ | com.salesforce.android.connectedapp.SalesforceConnectedApp |
Permits configuring your app as a Salesforce Connected App for receiving push notifications via Salesforce's APEX PushNotification API.
See the Salesforce Mobile Push Notifications Implementation Guide for more information about configuring your Org.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected final PushNotificationNotifier | notifier |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addPushNotificationListener(PushNotificationListener listener)
Provide a
PushNotificationListener instance with which to receive push notifications and
their payloads from Salesforce. | ||||||||||
static SalesforceConnectedApp |
create(Context context, ConnectedAppConfiguration configuration)
Create a SalesforceConnectedApp instance, which will allow you to register and unregister for
Salesforce push notifications from your Org.
| ||||||||||
Async<Void> |
registerDeviceForPushNotifications()
Register this device for push notifications.
| ||||||||||
void |
removePushNotificationListener(PushNotificationListener listener)
Exclude a
PushNotificationListener instance from receiving push notifications from Salesforce. | ||||||||||
Async<Void> |
unregisterDeviceFromPushNotifications()
Unregister this device from receiving push notifications from Salesforce.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Provide a PushNotificationListener
instance with which to receive push notifications and
their payloads from Salesforce.
PushNotificationListener
instances will not be notified of push notifications if the
device has not been successfully registered with Salesforce via registerDeviceForPushNotifications()
Create a SalesforceConnectedApp instance, which will allow you to register and unregister for Salesforce push notifications from your Org.
Register this device for push notifications. Registration will use OAuth tokens provided by your
AuthTokenProvider
implementation.
In order to receive notifications in your app you must also provide a PushNotificationListener
to addPushNotificationListener(PushNotificationListener)
.
Async
instance for managing the result of registration asynchronously
Exclude a PushNotificationListener
instance from receiving push notifications from Salesforce.
If you intend to completely prevent the device from receiving push notifications
you should call unregisterDeviceFromPushNotifications()
.
Unregister this device from receiving push notifications from Salesforce. De-registration will
use OAuth tokens provided by your AuthTokenProvider
implementation.
Any PushNotificationListener
instances you have provided to addPushNotificationListener(PushNotificationListener)
will no longer be called.
Async
instance for managing the result of de-registration asynchronously