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: NotificationLaunchIntentProvider for custom click destinations
  • Optional: NotificationChannelIdProvider for per-message channel assignment

Option 2 (Full Control):

  • Provide a NotificationBuilder implementation
  • Full responsibility for notification setup including:
    • Creating the NotificationCompat.Builder
    • Assigning notification channels
    • Redirecting launch intents via redirectIntentForAnalytics() for analytics

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 icon
  • launchIntentProvider - Optional provider for custom launch intents
  • channelIdProvider - Optional provider for notification channel IDs

Returns: NotificationCustomizationOptions instance


Returns string representation of the options.

  • NotificationManager.createDefaultNotificationChannel()

Target: androidJvm