public interface

NotificationListener

com.urbanairship.push.NotificationListener

Class Overview

Notification listener.

Summary

Public Methods
abstract void onNotificationBackgroundAction(NotificationInfo notificationInfo, NotificationActionButtonInfo actionButtonInfo)
Called when a background notification action button is tapped.
abstract void onNotificationDismissed(NotificationInfo notificationInfo)
Called when a notification is dismissed.
abstract boolean onNotificationForegroundAction(NotificationInfo notificationInfo, NotificationActionButtonInfo actionButtonInfo)
Called when a foreground notification action button is tapped.
abstract boolean onNotificationOpened(NotificationInfo notificationInfo)
Called when the notification is opened.
abstract void onNotificationPosted(NotificationInfo notificationInfo)
Called when a notification is posted.

Public Methods

public abstract void onNotificationBackgroundAction (NotificationInfo notificationInfo, NotificationActionButtonInfo actionButtonInfo)

Called when a background notification action button is tapped.

Parameters
notificationInfo The notification info.

public abstract void onNotificationDismissed (NotificationInfo notificationInfo)

Called when a notification is dismissed.

Parameters
notificationInfo The notification info.

public abstract boolean onNotificationForegroundAction (NotificationInfo notificationInfo, NotificationActionButtonInfo actionButtonInfo)

Called when a foreground notification action button is tapped.

Parameters
notificationInfo The notification info.
Returns
  • true if the application was launched, otherwise false. If false is returned, and autoLaunchApplication is enabled, the launcher activity will automatically be launched. The push message will be available in the launcher intent's extras. Use {@link PushMessage#fromIntent(Intent) to access the message

public abstract boolean onNotificationOpened (NotificationInfo notificationInfo)

Called when the notification is opened.

Parameters
notificationInfo The notification info.
Returns
  • true if the application was launched, otherwise false. If false is returned, and autoLaunchApplication is enabled, the launcher activity will automatically be launched. The push message will be available in the launcher intent's extras. Use {@link PushMessage#fromIntent(Intent) to access the message.

public abstract void onNotificationPosted (NotificationInfo notificationInfo)

Called when a notification is posted.

Parameters
notificationInfo The notification info.