Object NotificationHandlerFactory
-
- All Implemented Interfaces:
public class NotificationHandlerFactoryFactory for default NotificationHandler. Use it to customize an intent the user triggers when clicking on a notification.
-
-
Field Summary
Fields Modifier and Type Field Description public final static NotificationHandlerFactoryINSTANCE
-
Method Summary
Modifier and Type Method Description final static NotificationHandlercreateNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder, NotificationPermissionHandler permissionHandler, Function2<User, Message, CharSequence> notificationTextFormatter, Function3<Integer, Channel, Message, List<NotificationCompat.Action>> actionsProvider, Function2<NotificationCompat.Builder, ChatNotification, NotificationCompat.Builder> notificationBuilderTransformer)Method that creates a NotificationHandler. final static NotificationHandlercreateNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder, NotificationPermissionHandler permissionHandler, Function2<User, Message, CharSequence> notificationTextFormatter, Function3<Integer, Channel, Message, List<NotificationCompat.Action>> actionsProvider)Method that creates a NotificationHandler. final static NotificationHandlercreateNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder, NotificationPermissionHandler permissionHandler, Function2<User, Message, CharSequence> notificationTextFormatter)Method that creates a NotificationHandler. final static NotificationHandlercreateNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder, NotificationPermissionHandler permissionHandler)Method that creates a NotificationHandler. final static NotificationHandlercreateNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder)Method that creates a NotificationHandler. final static NotificationHandlercreateNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel)Method that creates a NotificationHandler. final static NotificationHandlercreateNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent)Method that creates a NotificationHandler. final static NotificationHandlercreateNotificationHandler(Context context, NotificationConfig notificationConfig)Method that creates a NotificationHandler. -
-
Method Detail
-
createNotificationHandler
@JvmOverloads() final static NotificationHandler createNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder, NotificationPermissionHandler permissionHandler, Function2<User, Message, CharSequence> notificationTextFormatter, Function3<Integer, Channel, Message, List<NotificationCompat.Action>> actionsProvider, Function2<NotificationCompat.Builder, ChatNotification, NotificationCompat.Builder> notificationBuilderTransformer)
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 appnotificationChannel- Lambda expression used to generate a NotificationChannel.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.notificationBuilderTransformer- Lambda expression used to transform the NotificationCompat.Builder before building the notification.- Returns:
A NotificationHandler instance.
-
createNotificationHandler
@JvmOverloads() final static NotificationHandler createNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder, NotificationPermissionHandler permissionHandler, Function2<User, Message, CharSequence> notificationTextFormatter, Function3<Integer, Channel, Message, List<NotificationCompat.Action>> actionsProvider)
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 appnotificationChannel- Lambda expression used to generate a NotificationChannel.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.- Returns:
A NotificationHandler instance.
-
createNotificationHandler
@JvmOverloads() final static NotificationHandler createNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder, NotificationPermissionHandler permissionHandler, Function2<User, Message, CharSequence> notificationTextFormatter)
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 appnotificationChannel- Lambda expression used to generate a NotificationChannel.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.- Returns:
A NotificationHandler instance.
-
createNotificationHandler
@JvmOverloads() final static NotificationHandler createNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder, NotificationPermissionHandler permissionHandler)
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 appnotificationChannel- Lambda expression used to generate a NotificationChannel.userIconBuilder- Generates IconCompat to be shown on notifications.permissionHandler- Handles android.Manifest.permission.POST_NOTIFICATIONS permission lifecycle.- Returns:
A NotificationHandler instance.
-
createNotificationHandler
@JvmOverloads() final static NotificationHandler createNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel, UserIconBuilder userIconBuilder)
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 appnotificationChannel- Lambda expression used to generate a NotificationChannel.userIconBuilder- Generates IconCompat to be shown on notifications.- Returns:
A NotificationHandler instance.
-
createNotificationHandler
@JvmOverloads() final static NotificationHandler createNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent, Function0<NotificationChannel> notificationChannel)
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 appnotificationChannel- Lambda expression used to generate a NotificationChannel.- Returns:
A NotificationHandler instance.
-
createNotificationHandler
@JvmOverloads() final static NotificationHandler createNotificationHandler(Context context, NotificationConfig notificationConfig, Function2<Message, Channel, Intent> newMessageIntent)
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- Returns:
A NotificationHandler instance.
-
createNotificationHandler
@JvmOverloads() final static NotificationHandler createNotificationHandler(Context context, NotificationConfig notificationConfig)
Method that creates a NotificationHandler.
- Parameters:
context- The Context to build the NotificationHandler with.notificationConfig- Configuration for push notifications.- Returns:
A NotificationHandler instance.
-
-
-
-