NotificationManager

abstract class NotificationManager

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
Provide your NotificationBuilder in the NotificationCustomizationOptions when initializing the SDK via setNotificationCustomizationOptions.
Link copied to clipboard
Provide your NotificationChannelIdProvider in the NotificationCustomizationOptions when initializing the SDK via setNotificationCustomizationOptions.
Link copied to clipboard
Provide your NotificationLaunchIntentProvider in the NotificationCustomizationOptions when initializing the SDK via setNotificationCustomizationOptions.

Properties

Link copied to clipboard
val DEFAULT_CHANNEL_ID: String = "com.salesforce.marketingcloud.DEFAULT_CHANNEL"
The channel id of the default notification channel created be the SDK.
Link copied to clipboard
val DEFAULT_FOREGROUND_CHANNEL_ID: String = "com.salesforce.marketingcloud.DEFAULT_FOREGROUND_CHANNEL"
The channel id of the default foreground notification channel created be the SDK.

Functions

Link copied to clipboard
Returns whether or not notifications are enabled.
Link copied to clipboard
Will cancel the notification associated with the provided message.
Link copied to clipboard
Will create the default notification channel used by the SDK only if it does not already exist.
Will create the default notification channel used by the SDK.
Link copied to clipboard
Will create the foreground notification channel used by the SDK only if it does not already exist.
Link copied to clipboard
abstract fun disableNotifications()
Disables notifications in the SDK.
Link copied to clipboard
abstract fun enableNotifications()
Enables notifications in the SDK.
Link copied to clipboard
Extracts the NotificationMessage from the Intent.
Link copied to clipboard
This method will build out a androidx.core.app.NotificationCompat.Builder with the defaults typically used by the SDK.
Link copied to clipboard
open fun redirectIntentForAnalytics(@NonNull context: Context, @NonNull openIntent: PendingIntent, @NonNull message: RemoteMessage, autoCancel: Boolean): PendingIntent
Returns a PendingIntent that will redirect to our internal Service to handle notification opened analytics.
Link copied to clipboard
Set a Should Show Notification Listener that will be queried as to whether or not a given notification should be displayed by the SDK.