NotificationCustomizationOptions
NotificationManager
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
com.salesforce.marketingcloud.pushfeature.notifications
An abstract class for managing push notifications in the Salesforce Marketing Cloud SDK.
Module: Push Feature Module v2.0.0
SDK: Salesforce Marketing Cloud Unified SDK 11.0.0
Platform: androidJvm
1NotificationManager()Default constructor with no parameters.
1fun areNotificationsEnabled(): BooleanReturns whether notifications are currently enabled.
Returns: Boolean - true if notifications are enabled, false otherwise
1fun enableNotifications()Enables push notifications.
1fun disableNotifications()Disables push notifications.
1fun showNotificationMessage(message: NotificationMessage)Displays a notification message.
Parameters:
message: NotificationMessage - The NotificationMessage to display1fun setShouldShowNotificationListener(listener: NotificationManager.ShouldShowNotificationListener?)Sets a listener to determine if a notification should be displayed.
Parameters:
listener: NotificationManager.ShouldShowNotificationListener? - The ShouldShowNotificationListener instance (nullable)1fun registerNotificationMessageDisplayedListener(listener: NotificationManager.NotificationMessageDisplayedListener)Registers a listener for notification display events.
Parameters:
listener: NotificationManager.NotificationMessageDisplayedListener - The NotificationMessageDisplayedListener to register1fun unregisterNotificationMessageDisplayedListener(listener: NotificationManager.NotificationMessageDisplayedListener)Removes a previously registered listener.
Parameters:
listener: NotificationManager.NotificationMessageDisplayedListener - The NotificationMessageDisplayedListener to unregister1object CompanionStatic companion object.
1fun interface NotificationBuilderProvides custom notification building. Used in NotificationCustomizationOptions during SDK initialization via PushFeatureConfig.notificationCustomizationOptions.
1fun interface NotificationChannelIdProviderProvides notification channel IDs. Used in NotificationCustomizationOptions.
1fun interface NotificationLaunchIntentProviderProvides intents for notification launches.
1fun interface NotificationMessageDisplayedListenerListens for notification display events.
1fun interface ShouldShowNotificationListenerQueries whether a notification should be shown.