Live Updates plugin
data-variant=info
data-slots=text
The Live Updates plugin (LiveUpdatePlugin) is a Mobile Core plugin that lets the Adobe Journey Optimizer extension display Android Live Updates. Live Updates are ongoing notifications that show the progress of an activity, such as a delivery or a ride, and that you start, update, and end with push notifications sent from Adobe Journey Optimizer.
When your app receives a Live Update push notification, the Adobe Journey Optimizer extension passes it to the Live Updates plugin. The plugin displays the notification and tracks its lifecycle and interaction events in Adobe Journey Optimizer.
When Android promotes the notification, it is displayed as a Live Update. Otherwise, it is displayed as a standard ongoing notification. See Promotion to a Live Update.
Add the Live Updates plugin to your app
Include the plugin as an app dependency
Add the liveupdates dependency to your app, along with Mobile Core, Edge Network, and the Adobe Journey Optimizer extension. For the complete list of dependencies, see Live Updates dependencies.
data-variant=info
data-slots=text
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. Create the plugin with an ILiveUpdateStyleProvider that defines how Live Update notifications are styled in your app.
data-slots=heading, code
data-repeat=2
data-languages=Kotlin, Java
Kotlin
MobileCore.addPlugins(LiveUpdatePlugin(MyLiveUpdateStyleProvider()))
MobileCore.initialize(this, "ENVIRONMENT_ID")
Java
MobileCore.addPlugins(new LiveUpdatePlugin(new MyLiveUpdateStyleProvider()));
MobileCore.initialize(this, "ENVIRONMENT_ID");
For more information about adding plugins, see Add plugins to your app.
Behavior when the plugin is not added
If your app receives a Live Update push notification and the Live Updates plugin is not added, the Adobe Journey Optimizer extension logs a warning and does not display the notification. Other push notifications are not affected.