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
This class manages notification customization settings for the SDK. It offers two approaches for customizing push notifications:
Option 1 - Guided Approach: Provide a small icon resource ID at minimum. Optionally add a NotificationLaunchIntentProvider for click handling or a NotificationChannelIdProvider for per-message channel assignment.
Option 2 - Full Control: Supply a NotificationBuilder to manage the complete notification setup, including:
NotificationCompat.BuilderNotificationManager.redirectIntentForAnalyticsThe SDK handles notification display in both scenarios.
1class NotificationCustomizationOptions1val channelIdProvider: NotificationManager.NotificationChannelIdProvider?Provider for determining notification channel IDs on a per-message basis.
1val launchIntentProvider: NotificationManager.NotificationLaunchIntentProvider?Provider for customizing the intent when a notification is clicked.
1val notificationBuilder: NotificationManager.NotificationBuilder?Custom builder for complete control over notification creation.
1val smallIconResId: IntResource ID for the notification’s small icon.
1object CompanionCompanion object for the NotificationCustomizationOptions class.
NotificationManager.Companion.getDefaultNotificationBuilderNotificationManager.Companion.createDefaultNotificationChannel