public class

NotificationCustomizationOptions

extends Object
java.lang.Object
   ↳ com.salesforce.marketingcloud.notifications.NotificationCustomizationOptions

Class Overview

The class holds any notification customization options allowed by the SDK. It is designed to make understanding and customizing notifications easier than in previous versions of the SDK. With this you can elect to take one of two possible options for customization:

Option one is a guided approach where in you can provide, at a minimum, the resource ID for the notification's small icon. Optionally, you could provide a NotificationManager.NotificationLaunchIntentProvider to customize the destination of a notification when clicked, and/or a NotificationManager.NotificationChannelIdProvider to specify on a per message basis which notification channel will be assigned to the notification.

Option two will require you to provide a NotificationManager.NotificationBuilder in which you will be responsible for the entire process of setting up the notification. These responsibilities include, but are not limited to:

The SDK will still display the notification with this option.

Summary

Public Methods
static NotificationCustomizationOptions create(NotificationManager.NotificationBuilder notificationBuilder)
static NotificationCustomizationOptions create(int smallIconResId)
Creates a NotificationCustomizationOptions with only the notification's small icon resource id.
static NotificationCustomizationOptions create(int smallIconResId, NotificationManager.NotificationLaunchIntentProvider launchIntentProvider, NotificationManager.NotificationChannelIdProvider channelIdProvider)
Created a NotificationCustomizationOptions with the notification's small icon resource id and optional instances of NotificationManager.NotificationLaunchIntentProvider and NotificationManager.NotificationChannelIdProvider.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static NotificationCustomizationOptions create (NotificationManager.NotificationBuilder notificationBuilder)

Creates a NotificationCustomizationOptions with only a NotificationManager.NotificationBuilder. This options leaves everything about setting up the notification up to you. See "Option two" in the class documentation for more details.

Parameters
notificationBuilder Notification builder
Returns
  • NotificationCustomizationOptions

public static NotificationCustomizationOptions create (int smallIconResId)

Creates a NotificationCustomizationOptions with only the notification's small icon resource id. This is the simplest approach to notifications in the SDK. Everything else will be handled by the SDK.

Parameters
smallIconResId The notification's small icon resource id.
Returns
  • NotificationCustomizationOptions

public static NotificationCustomizationOptions create (int smallIconResId, NotificationManager.NotificationLaunchIntentProvider launchIntentProvider, NotificationManager.NotificationChannelIdProvider channelIdProvider)

Created a NotificationCustomizationOptions with the notification's small icon resource id and optional instances of NotificationManager.NotificationLaunchIntentProvider and NotificationManager.NotificationChannelIdProvider.

Parameters
smallIconResId The notification's small icon resource id.
launchIntentProvider Launch intent provider.
channelIdProvider Channel id provider.
Returns
  • NotificationCustomizationOptions

public String toString ()