java.lang.Object | |
↳ | com.salesforce.marketingcloud.messages.push.PushMessageManager |
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | PushMessageManager.PushTokenRefreshListener | ||||||||||
interface | PushMessageManager.SilentPushListener |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PushMessageManager() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
disablePush()
Disables push messaging in the SDK.
| ||||||||||
abstract void |
enablePush()
Enabled push messaging in the SDK.
| ||||||||||
abstract JSONObject |
getPushDebugInfo()
Returns information that can help investigate push message issues.
| ||||||||||
abstract String |
getPushToken()
Returns the push token used to push.
| ||||||||||
abstract boolean |
handleMessage(Map<String, String> pushData)
Handles the push message payload for any message sent from the Marketing Cloud.
| ||||||||||
abstract boolean |
handleMessage(RemoteMessage message)
Handles the remote message payload for and message sent from the Marketing Cloud.
| ||||||||||
static boolean |
isMarketingCloudPush(Map<String, String> pushData)
Helper method to identify a push message payload sent from the Marketing Cloud.
| ||||||||||
static boolean |
isMarketingCloudPush(RemoteMessage message)
Helper method to identify a RemoteMessage sent from the Marketing Cloud.
| ||||||||||
abstract boolean |
isPushEnabled()
Returns whether or not push messaging is enabled.
| ||||||||||
abstract void |
registerSilentPushListener(PushMessageManager.SilentPushListener listener)
Registers the provided
listener . | ||||||||||
abstract void |
registerTokenRefreshListener(PushMessageManager.PushTokenRefreshListener listener)
Registers the provided
listener . | ||||||||||
abstract void |
setPushToken(String pushToken)
Only call this method if you are handling the request, and refresh of, the push token from Google.
| ||||||||||
abstract void |
unregisterSilentPushListener(PushMessageManager.SilentPushListener listener)
Unregisters the provided
listener . | ||||||||||
abstract void |
unregisterTokenRefreshListener(PushMessageManager.PushTokenRefreshListener listener)
Unregisters the provided
listener . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Disables push messaging in the SDK. Calling this will result in no push messages being sent to the device.
Enabled push messaging in the SDK. Push messaging is on by default. If after enabling push
you still don't see notifications then check areNotificationsEnabled()
.
Returns information that can help investigate push message issues. Please be sure to provide this information when submitting a request for support.
Returns the push token used to push. This is either the value retrieved by the SDK or the one provided
in setPushToken(String)
Handles the push message payload for any message sent from the Marketing Cloud.
pushData | Push message payload |
---|
Handles the remote message payload for and message sent from the Marketing Cloud.
message | Remote message payload |
---|
Helper method to identify a push message payload sent from the Marketing Cloud.
pushData | Push message payload |
---|
Helper method to identify a RemoteMessage sent from the Marketing Cloud.
message | Push message payload |
---|
Returns whether or not push messaging is enabled. If false
then no push messages will be
sent to the device.
Registers the provided listener
.
Registers the provided listener
.
Only call this method if you are handling the request, and refresh of, the push token from Google. Set the push token to be used by the Marketing Cloud to send push messages to the device. The push token is a required value to send a registration payload to the Marketing Cloud so if you fail to set this value you will not see updates to the registration.
pushToken | The token value to provided by Google. |
---|
Unregisters the provided listener
.
Unregisters the provided listener
.