Plugins
data-variant=info
data-slots=text
Plugins are optional modules that add a specific capability to an Adobe Experience Platform Mobile SDK extension. For example, the Adobe Journey Optimizer extension uses the Live Updates plugin to display Android Live Updates, and the UI Builder plugin to display Adobe Journey Optimizer push templates.
You add plugins to Mobile Core when your app starts, before you register extensions. When an extension needs a capability, it uses the matching plugin that your app registered. If your app does not use a capability, you do not need to include or register its plugin.
Plugins and extensions
Extensions and plugins are both modules that you add to your app, but they serve different purposes.
MobileCore.initialize or MobileCore.registerExtensions API.MobileCore.addPlugins API.Benefits
- Include only what you use: A capability that lives in a plugin is not part of the extension. Apps that do not use the capability do not need the plugin or its dependencies.
- Adopt new platform features independently: A plugin can use newer Android APIs and libraries than the extension that uses it. For example, the Live Updates plugin is built on Android 16 (API 36.1) notification APIs, while the Adobe Journey Optimizer extension does not require them.
- Fall back safely: If a plugin is not registered, the extension that uses it logs a warning and continues to work.
Available plugins
The following plugins are available for the Adobe Journey Optimizer extension.
LiveUpdatePlugin)com.adobe.marketing.mobile:liveupdatesNotificationBuilderPlugin)com.adobe.marketing.mobile:notificationbuilderdata-variant=warning
data-slots=text
notificationbuilder dependency to your app and register the NotificationBuilderPlugin.Add plugins to your app
Include plugins as app dependencies
Add the plugins that you want to use, along with Mobile Core and the Adobe Journey Optimizer extension, as dependencies to your project by including them in the app's Gradle file.
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:liveupdates")
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:liveupdates'
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.
Register plugins with Mobile Core
Register your plugins with the MobileCore.addPlugins API in the onCreate method of your Application class, before you initialize the SDK. This ensures that plugins are available when extensions start processing, including when your app is started by a push notification.
You can register one or more plugins in a single call. Registering the same plugin instance more than once has no effect.
data-slots=heading, code
data-repeat=2
data-languages=Kotlin, Java
Kotlin
import com.adobe.marketing.mobile.MobileCore
import com.adobe.marketing.mobile.messaging.liveupdate.LiveUpdatePlugin
import com.adobe.marketing.mobile.notificationbuilder.NotificationBuilderPlugin
...
import android.app.Application
...
class MainApp : Application() {
override fun onCreate() {
super.onCreate()
MobileCore.addPlugins(
NotificationBuilderPlugin(),
LiveUpdatePlugin(MyLiveUpdateStyleProvider())
)
MobileCore.initialize(this, "ENVIRONMENT_ID")
}
}
Java
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.messaging.liveupdate.LiveUpdatePlugin;
import com.adobe.marketing.mobile.notificationbuilder.NotificationBuilderPlugin;
...
import android.app.Application;
...
public class MainApp extends Application {
@Override
public void onCreate(){
super.onCreate();
MobileCore.addPlugins(
new NotificationBuilderPlugin(),
new LiveUpdatePlugin(new MyLiveUpdateStyleProvider())
);
MobileCore.initialize(this, "ENVIRONMENT_ID");
}
}
In the examples above, MyLiveUpdateStyleProvider is a class in your app that implements ILiveUpdateStyleProvider and defines how Live Update notifications are styled.
Behavior when a plugin is not registered
If your app receives a push notification that requires a plugin that is not registered, the Adobe Journey Optimizer extension logs a warning and handles the notification as follows: