NotificationFactory

Factory for creating notifications.

Interface defines the contract for creating notifications. It includes methods for creating notifications and setting a callback for customizing the notification builder.

Syntax: interface NotificationFactory

Inheritors

Types

NameType
Companionobject Companion

Companion Properties

NameType
ACTION_NOTIFICATION_CLICKconst val ACTION_NOTIFICATION_CLICK: String
DEFAULT_CHANNEL_IDconst val DEFAULT_CHANNEL_ID: String

Properties

NameSyntaxDescription
notificationBuilderCallbackabstract var notificationBuilderCallback: NotificationBuilderCallback?Callback for building notifications.

Functions

Function NameReturn TypeDescription
createNotificationNotificationCreates a notification.

createNotification

Creates a notification.

Syntax: abstract fun createNotification(context: Context, message: PushMessage, notificationId: Int, smallIconResourceId: Int = 0, largeIcon: Bitmap? = null, bigPicture: Bitmap? = null): Notification

Return: The created notification.

Parameters:

ParametersTypeDescription
contextContextThe application context.
messagePushMessageThe push message for the notification.
notificationIdIntThe ID for the notification.
smallIconResourceIdIntOptional small icon resource ID for the notification.
largeIconBitmapOptional big icon for the notification.
bigPictureBitmapOptional big picture for the notification.