createNotificationHandler
fun createNotificationHandler(context: Context, notificationConfig: NotificationConfig, newMessageIntent: (message: Message, channel: Channel) -> Intent = getDefaultNewMessageIntentFun(context), notificationChannel: () -> NotificationChannel = getDefaultNotificationChannel(context), userIconBuilder: UserIconBuilder = provideDefaultUserIconBuilder(context), permissionHandler: NotificationPermissionHandler? = provideDefaultNotificationPermissionHandler(context), notificationTextFormatter: (currentUser: User?, message: Message) -> CharSequence = getDefaultNotificationTextFormatter(notificationConfig), actionsProvider: (notificationId: Int, channel: Channel, message: Message) -> List<NotificationCompat.Action> = getDefaultActionsProvider(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
Handles android.Manifest.permission.POST_NOTIFICATIONS permission lifecycle.
notificationTextFormatter
Lambda expression used to formats the text of the notification.
actionsProvider
Lambda expression used to provide actions for the notification.