-
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, Function1<PushMessage, Boolean> onPushMessage, NotificationIdFactory notificationIdFactory)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, Function2<NotificationCompat.Builder, ChatNotification, NotificationCompat.Builder> notificationBuilderTransformer, Function1<PushMessage, Boolean> onPushMessage)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, 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, Function1<PushMessage, Boolean> onPushMessage, NotificationIdFactory notificationIdFactory)
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.onPushMessage- Lambda expression called when a new push message is received.notificationIdFactory- Custom factory for generating notification IDs based on ChatNotification.
-
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, Function1<PushMessage, Boolean> onPushMessage)
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.onPushMessage- Lambda expression called when a new push message is received.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
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.
-
-
-
-