Package com.wonderpush.sdk
Interface WonderPushDelegate
- All Known Implementing Classes:
WonderPushAbstractDelegate
public interface WonderPushDelegate
The interface of the WonderPush SDK delegate you can implement for a tighter integration.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onNotificationOpened
(org.json.JSONObject notif, int buttonIndex) Hook called when a notification is clicked.default void
onNotificationReceived
(org.json.JSONObject notif) Hook called when a notification is receiveddefault void
setContext
(android.content.Context context) Override this method to store the context in your implementation if needed.urlForDeepLink
(DeepLinkEvent event) Hook called when the SDK is trying to open a deep-link with the appropriate activity or service.
-
Method Details
-
urlForDeepLink
Hook called when the SDK is trying to open a deep-link with the appropriate activity or service.Note: This does not fire for silent data notifications.
Return the URL the SDK should proceed with, or
null
if you handled the deep-link yourself. Simply returnevent.getUrl()
to continue with the default behavior.- Parameters:
event
- The deep-link event information- Returns:
- The URL the SDK should open, or
null
if it should stop normal processing.
-
onNotificationOpened
default void onNotificationOpened(org.json.JSONObject notif, int buttonIndex) Hook called when a notification is clicked.- Parameters:
notif
- The clicked notificationbuttonIndex
- The index of the button clicked in the notification, or -1 when the notification itself was clicked
-
onNotificationReceived
default void onNotificationReceived(org.json.JSONObject notif) Hook called when a notification is received- Parameters:
notif
- The received notification
-
setContext
default void setContext(android.content.Context context) Override this method to store the context in your implementation if needed.- Parameters:
context
- The context.
-