NotificationActionHandler

Handles actions for notifications.

It defines the methods necessary for handling actions triggered by interacting with a notification, allowing for custom behavior to be defined when a user acts on a notification.

Interface for handling notification actions.

Syntax: interface NotificationActionHandler

Types

NameType
Companionobject Companion

Companion Properties

NameReturn TypeDescription
ACTION_DEEPLINKStringconst val ACTION_DEEPLINK: String
ACTION_DISMISSStringconst val ACTION_DISMISS: String
ACTION_IN_LINE_REPLYStringconst val ACTION_IN_LINE_REPLY: String
ACTION_OPEN_APPStringconst val ACTION_OPEN_APP: String
ACTION_OPEN_HTMLStringconst val ACTION_OPEN_HTML: String
ACTION_OPEN_URLStringconst val ACTION_OPEN_URL: String
ACTION_OPEN_WEB_VIEWStringconst val ACTION_OPEN_WEB_VIEW: String
ACTION_SHAREStringconst val ACTION_SHARE: String
ACTION_TRIVIAL_REPLIESStringconst val ACTION_TRIVIAL_REPLIES: String

Functions

NameDescription
handleActionabstract fun handleAction(context: Context, action: String, intent: Intent): Boolean
Handles the action that has been triggered.

handleAction

Handles the action that has been triggered.

Syntax: abstract fun handleAction(context: Context, action: String, intent: Intent): Boolean

Return: True if the action should be overridden, false otherwise.

Parameters:

NameDescription
contextThe context in which the receiver is running.
actionThe action that has been triggered.
intentThe intent contains the action and additional data.