-
public interface InAppNotificationListenerA listener for in-app notifications.
-
-
Method Summary
Modifier and Type Method Description abstract booleanbeforeShow(Map<String, Object> extras)This is called when an in-app notification is about to be rendered.If you'd like this notification to not be rendered, then return false. abstract voidonShow(CTInAppNotification ctInAppNotification)This is called when an in-app notification is rendered. abstract voidonDismissed(Map<String, Object> extras, @Nullable() Map<String, Object> actionExtras)When an in-app notification is dismissed (either by the close button, or a call to action),this method will be called. -
-
Method Detail
-
beforeShow
abstract boolean beforeShow(Map<String, Object> extras)
This is called when an in-app notification is about to be rendered.If you'd like this notification to not be rendered, then return false.
Returning true will cause this notification to be rendered immediately.
- Parameters:
extras- The extra key/value pairs set in the CleverTap dashboard for this notification
-
onShow
abstract void onShow(CTInAppNotification ctInAppNotification)
This is called when an in-app notification is rendered.
- Parameters:
ctInAppNotification- The CTInAppNotification object for this notification.
-
onDismissed
abstract void onDismissed(Map<String, Object> extras, @Nullable() Map<String, Object> actionExtras)
When an in-app notification is dismissed (either by the close button, or a call to action),this method will be called.
- Parameters:
extras- The extra key/value pairs set in the CleverTap dashboard for this notificationactionExtras- The extra key/value pairs from the notification(for example, a rating widget might have some properties which can be read here)Note: This can be null if the notification was dismissed without taking any action
-
-
-
-