NotificationBuilderPlugin

The UI Builder plugin class. Add it to Mobile Core so the Adobe Journey Optimizer extension can render push templates: Basic (ajo_basic) and Big text (ajo_bigtext).

NotificationBuilderPlugin is available on Android only.

Class Definition

Implements the Mobile Core IUiTemplatePlugin contract. Package com.adobe.marketing.mobile.notificationbuilder, in the notificationbuilder artifact.

class NotificationBuilderPlugin : IUiTemplatePlugin

Constructor

NotificationBuilderPlugin()

Creates the plugin. It takes no parameters.

Example

Add the plugin once, in Application.onCreate, before you initialize the SDK:

data-slots=heading, code
data-repeat=2
data-languages=Kotlin, Java

Kotlin

MobileCore.addPlugins(NotificationBuilderPlugin())

Java

MobileCore.addPlugins(new NotificationBuilderPlugin());

For the dependencies, see Add the UI Builder plugin to your app.

Methods

buildPushTemplateNotification

Builds the notification for a push template. The Adobe Journey Optimizer extension calls this method when a push carries the adb_template_type key; your app does not call it.

override fun buildPushTemplateNotification(
    messageData: Map<String, String>,
    trackingProvider: IPushTemplateTrackingProvider
): Notification?

Parameters

Returns

The built Notification, which the Adobe Journey Optimizer extension displays and tracks. Returns null for a template type other than ajo_basic and ajo_bigtext, or when the notification cannot be built. The Adobe Journey Optimizer extension then displays a standard notification.