NotificationBuilderCallback

Callback for building notifications.

Interface for building notifications.

Syntax: interface NotificationBuilderCallback

Functions

MethodsDescription
getActionIconIdThis method retrieves the icon ID for a specific action associated with a push message. It allows customization of the action icons in the notification.
onBuildNotificationThis method is responsible for building a notification using the provided context, push message, notification ID, and notification builder. It allows customization of the notification based on the push message data.

getActionIconId

This method retrieves the icon ID for a specific action associated with a push message. It allows customization of the action icons in the notification.

Syntax: abstract fun getActionIconId(context: Context, message: PushMessage, action: String, identifier: String): Int

Return Value: The icon ID for the action.

Parameters:

ParametersTypeDescription
contextContextThe application context.
messagePushMessageThe push message associated with the action.
actionStringThe action for which the icon ID is needed.
identifierStringThe identifier for the action.

onBuildNotification

This method is responsible for building a notification using the provided context, push message, notification ID, and notification builder. It allows customization of the notification based on the push message data.

Syntax: abstract fun onBuildNotification(context: Context, message: PushMessage, notificationId: Int, builder: NotificationCompat.Builder)

Parameters:

ParametersTypeDescription
contextContextThe application context.
messagePushMessageThe push message for the notification.
notificationIdIntThe ID for the notification.
builderNotificationCompat.BuilderThe notification builder.