createNotificationHandler

fun createNotificationHandler(context: Context, notificationConfig: NotificationConfig, newMessageIntent: (message: Message, channel: Channel) -> Intent? = null, notificationChannel: () -> NotificationChannel? = null, userIconBuilder: UserIconBuilder = provideDefaultUserIconBuilder(context), permissionHandler: NotificationPermissionHandler? = provideDefaultNotificationPermissionHandler(context)): NotificationHandler

Method that creates a NotificationHandler.

Parameters

context

The Context to build the NotificationHandler with.

notificationConfig

Configuration for push notifications.

newMessageIntent

Lambda expression used to generate an Intent to open your app

notificationChannel

Lambda expression used to generate a NotificationChannel. Used in SDK_INT >= VERSION_CODES.O.

userIconBuilder

Generates IconCompat to be shown on notifications.

permissionHandler

fun createNotificationHandler(context: Context, newMessageIntent: (message: Message, channel: Channel) -> Intent? = null, notificationChannel: () -> NotificationChannel? = null, userIconBuilder: UserIconBuilder = provideDefaultUserIconBuilder(context), permissionHandler: NotificationPermissionHandler? = provideDefaultNotificationPermissionHandler(context), autoTranslationEnabled: Boolean = false): NotificationHandler

Method that creates a NotificationHandler.

Parameters

context

The Context to build the NotificationHandler with.

newMessageIntent

Lambda expression used to generate an Intent to open your app

notificationChannel

Lambda expression used to generate a NotificationChannel. Used in SDK_INT >= VERSION_CODES.O.

userIconBuilder

Generates IconCompat to be shown on notifications.

permissionHandler
autoTranslationEnabled

Enables automatic translation of push notifications.