SDK Callbacks
We recommend putting all SDK callbacks within your application's main onCreate
method to ensure proper handling of all events.
SDK Lifecycle Callbacks
These callbacks can be implemented to observe SDK loading and exiting.
In order to implement these callbacks you must have a class that calls the SDK's registerSDKLifecycleCallbacks
method and implements the callback(s) within it.
The following SDK Lifecycle callbacks are available:
Finished Loading
This callback is executed when the SDK finishes its initialization and is ready for interaction.
Permission Lifecycle Callbacks
These callbacks can be implemented to observe to a user's permission authorization changes.
In order to implement these callbacks you must have a class that calls the SDK's registerPermissionLifecycleCallbacks
method and implements the callback(s) within it.
The following Permission Lifecycle callbacks are available:
Permission Status Changed
This callback is executed when a user's permission status/authorization has changed.
The response
variable represents the user's new permission status.
Notification Lifecycle Callbacks
These callbacks can be implemented to observe events like impressions, opens, and other interactions with notifications.
In order to implement these callbacks you must have a class that calls the SDK's registerNotificationLifecycleCallbacks
method and implements the callback(s) within it.
The following Notification Lifecycle callbacks are available:
Notification Received
This callback is executed when a user receives a notification
Notification Opened With URI/URL Destination
This callback is executed when a notification is opened that has a landing URL attached. The subscriber should be navigated to the view that represents the URL.
This method expects a Boolean response. If the response is true
then the SDK will perform no additional actions for this notification open. If the response is false
then the SDK will attempt to navigate the subscriber to the destination URL.
See the Deep Linking documentation for a complete example.
App Message Lifecycle Callbacks
These callbacks can be implemented to observe events like impressions, opens, and other interactions with app messages.
In order to implement these callbacks you must have a class that calls the SDK's registerAppMessageLifecycleCallbacks
method and implements the callback(s) within it.
The following App Message Lifecycle callbacks are available:
App Message Will Present
This callback is executed when an App Message is presented to a user.
App Message Received User Interaction
This callback is executed when a user interacts with an App Message.
This method expects a Boolean response. If the response is true
then the SDK will not handle the interaction or attempt to perform navigation when the interaction is an Open URL action. If the response is false
then the SDK will process the interaction and if the interaction is an Open URL action will attempt to navigate the user to the destination URL by using the open
method.
Last updated