BatchNotificationChannelsManager

BatchNotificationChannelsManager manages how Batch interacts with Android 8.0 (API 26). It allows you to control which default notification channel Batch will use, how it is named, or to provide your own channel per notification

Types

Link copied to clipboard
Interface describing a channel name provider.
Link copied to clipboard
Interface describing a channel ID interceptor for notifications displayed by Batch
Link copied to clipboard
Implementation of ChannelNameProvider using a String resource to automatically fetch the right translation.

Properties

Link copied to clipboard
val DEFAULT_CHANNEL_ID: String = "_BATCHSDK_DEFAULT"

Functions

Link copied to clipboard
Opens the notification channel settings system UI for Batch's default channel.
open fun openSystemChannelSettings(@NonNull context: Context, @NonNull channelId: String): Boolean
Opens the notification channel settings system UI for the specified channel Will do nothing on API <26
Link copied to clipboard
Link copied to clipboard
Used to set a channel id interceptor, allowing you to override the Channel ID of a notification, per notification.
Link copied to clipboard
open fun setChannelIdOverride(@Nullable channelId: String)
Overrides the default notification channel that Batch will use for notifications.
Link copied to clipboard
open fun setChannelName(@NonNull context: Context, @StringRes channelNameResourceId: Int)
Used to set a channel name provider, allowing you to change Batch's default channel name.
Link copied to clipboard
Used to set a channel name provider, allowing you to change Batch's default channel name.