NotificationCustomizationOptions
NotificationManager
NotificationMessage
ProximityNotificationCustomizer
PushNotificationActionHandler
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Package: com.salesforce.marketingcloud.notifications
SDK Version: 11.0.0
1open class NotificationCustomizationOptionsThis class manages notification customization options for the Salesforce Marketing Cloud SDK. It provides two approaches for customizing notifications:
Option 1 (Guided Approach):
NotificationLaunchIntentProvider for custom click destinationsNotificationChannelIdProvider for per-message channel assignmentOption 2 (Full Control):
NotificationBuilder implementationNotificationCompat.BuilderredirectIntentForAnalytics() for analyticsThe SDK handles notification display in both options.
1@get:Nullable
2val notificationBuilder: NotificationManager.NotificationBuilderGets the custom notification builder if one was provided.
1@NonNull
2open fun create(
3 @NonNull notificationBuilder: NotificationManager.NotificationBuilder
4): NotificationCustomizationOptionsCreates options with only a NotificationBuilder.
Parameters:
notificationBuilder - Custom builder for complete notification controlReturns: NotificationCustomizationOptions instance
1@NonNull
2open fun create(
3 @DrawableRes smallIconResId: Int
4): NotificationCustomizationOptionsCreates options with just the small icon resource ID.
Parameters:
smallIconResId - Drawable resource ID for the notification’s small iconReturns: NotificationCustomizationOptions instance
1@NonNull
2open fun create(
3 @DrawableRes smallIconResId: Int,
4 @Nullable launchIntentProvider: NotificationManager.NotificationLaunchIntentProvider,
5 @Nullable channelIdProvider: NotificationManager.NotificationChannelIdProvider
6): NotificationCustomizationOptionsCreates options with icon and optional providers.
Parameters:
smallIconResId - Drawable resource ID for the notification’s small iconlaunchIntentProvider - Optional provider for custom launch intentschannelIdProvider - Optional provider for notification channel IDsReturns: NotificationCustomizationOptions instance
1@NonNull
2open fun toString(): StringReturns string representation of the options.
NotificationManager.createDefaultNotificationChannel()Target: androidJvm