NotificationCustomizationOptions
Package: com.salesforce.marketingcloud.notifications
SDK Version: 11.0.0
This class manages notification customization options for the Salesforce Marketing Cloud SDK. It provides two approaches for customizing notifications:
Option 1 (Guided Approach):
- Minimum requirement: resource ID for notification’s small icon
- Optional:
NotificationLaunchIntentProviderfor custom click destinations - Optional:
NotificationChannelIdProviderfor per-message channel assignment
Option 2 (Full Control):
- Provide a
NotificationBuilderimplementation - Full responsibility for notification setup including:
- Creating the
NotificationCompat.Builder - Assigning notification channels
- Redirecting launch intents via
redirectIntentForAnalytics()for analytics
- Creating the
The SDK handles notification display in both options.
Gets the custom notification builder if one was provided.
Creates options with only a NotificationBuilder.
Parameters:
notificationBuilder- Custom builder for complete notification control
Returns: NotificationCustomizationOptions instance
Creates options with just the small icon resource ID.
Parameters:
smallIconResId- Drawable resource ID for the notification’s small icon
Returns: NotificationCustomizationOptions instance
Creates 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 IDs
Returns: NotificationCustomizationOptions instance
Returns string representation of the options.
NotificationManager.createDefaultNotificationChannel()
Target: androidJvm