UI Builder plugin

data-variant=info
data-slots=text
The UI Builder plugin is available for Android only, starting with Notification Builder 3.1.0, Messaging 3.13.0, and Mobile Core 3.10.0 (BOM 3.23.0).

The UI Builder plugin is a Mobile Core plugin that builds user interface elements for content sent from Adobe Journey Optimizer. The Adobe Journey Optimizer extension passes the content to the plugin, which builds the user interface element. The extension then displays the element and tracks interactions with it.

The plugin is published in the notificationbuilder artifact, and you add it to Mobile Core as a NotificationBuilderPlugin.

Supported features

The UI Builder plugin supports the following features.

Feature
Description
Push templates
Displays Adobe Journey Optimizer push notifications with pre-built layouts.

Add the UI Builder plugin to your app

Include the plugin as an app dependency

Add the notificationbuilder dependency to your app, along with Mobile Core, Edge Network, Identity for Edge Network, and the Adobe Journey Optimizer extension.

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

Kotlin

implementation(platform("com.adobe.marketing.mobile:sdk-bom:<bom-version>"))
implementation("com.adobe.marketing.mobile:core")
implementation("com.adobe.marketing.mobile:edge")
implementation("com.adobe.marketing.mobile:edgeidentity")
implementation("com.adobe.marketing.mobile:messaging")
implementation("com.adobe.marketing.mobile:notificationbuilder")

Groovy

implementation platform('com.adobe.marketing.mobile:sdk-bom:<bom-version>')
implementation 'com.adobe.marketing.mobile:core'
implementation 'com.adobe.marketing.mobile:edge'
implementation 'com.adobe.marketing.mobile:edgeidentity'
implementation 'com.adobe.marketing.mobile:messaging'
implementation 'com.adobe.marketing.mobile:notificationbuilder'

Replace <bom-version> with the latest BOM version, listed on Current SDK versions.

For the minimum versions, see Available plugins.

Add the plugin to Mobile Core

Add the plugin with the MobileCore.addPlugins API in the onCreate method of your Application class, before you initialize the SDK.

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

Kotlin

MobileCore.addPlugins(NotificationBuilderPlugin())
MobileCore.initialize(this, "ENVIRONMENT_ID")

Java

MobileCore.addPlugins(new NotificationBuilderPlugin());
MobileCore.initialize(this, "ENVIRONMENT_ID");

For more information about adding plugins, see Add plugins to your app.

Push templates

Push templates are push notifications that Adobe Journey Optimizer sends with a pre-built layout. A push template is identified by the adb_template_type key in the push payload. The following templates are supported:

When your app receives a push template, the Adobe Journey Optimizer extension passes it to the plugin, which builds the notification. The Adobe Journey Optimizer extension then displays the notification and tracks interactions with it, as it does for any other push notification.

data-variant=warning
data-slots=text
Push templates are displayed only with automatic display and tracking. If your app builds notifications itself with manual display and tracking, push templates are displayed as standard notifications.

Behavior when the plugin is not added

If your app receives a push template and the UI Builder plugin is not added, the Adobe Journey Optimizer extension logs a warning and displays the push as a standard notification, built from the title, body, and image in the payload. Your app does not crash, and other push notifications are not affected.

The same happens when the plugin cannot build the notification, for example, for a template type that it does not support. For more information, see Push templates troubleshooting.

Next steps