java.lang.Object | |
↳ | com.salesforce.marketingcloud.notifications.NotificationCustomizationOptions |
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:
redirectIntentForAnalytics(Context, PendingIntent, NotificationMessage, boolean)
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static NotificationCustomizationOptions |
create(NotificationManager.NotificationBuilder notificationBuilder)
Creates a
NotificationCustomizationOptions with only a NotificationManager.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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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.
notificationBuilder | Notification builder |
---|
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.
smallIconResId | The notification's small icon resource id. |
---|
Created a NotificationCustomizationOptions
with the notification's small icon resource id and
optional instances of NotificationManager.NotificationLaunchIntentProvider
and
NotificationManager.NotificationChannelIdProvider
.
smallIconResId | The notification's small icon resource id. |
---|---|
launchIntentProvider | Launch intent provider. |
channelIdProvider | Channel id provider. |