LiveUpdatePlugin
The Live Updates plugin. Add it to Mobile Core so the Adobe Journey Optimizer extension can route Live Update pushes to it. For how the plugin processes a push, see Live Updates plugin.
Class Definition
Implements the Mobile Core ILiveupdatePlugin contract. Package com.adobe.marketing.mobile.messaging.liveupdate.
class LiveUpdatePlugin(styleProvider: ILiveUpdateStyleProvider) : ILiveupdatePlugin
Constructor
LiveUpdatePlugin(styleProvider)
Creates the plugin with the style provider your app uses for every Live Update.
Parameters
- styleProvider: The ILiveUpdateStyleProvider that maps each Live Update to a notification style.
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(LiveUpdatePlugin(MyLiveUpdateStyleProvider()))
Java
MobileCore.addPlugins(new LiveUpdatePlugin(new MyLiveUpdateStyleProvider()));
Methods
handleLiveUpdatePush
Handles a Live Update push. The Adobe Journey Optimizer extension calls this method when a push carries the adb_liveupdate_data key; your app does not call it. To raise a Live Update from your app, use triggerLocalLiveUpdate.
override fun handleLiveUpdatePush(context: Context, message: Any)
Parameters
- context: The application
Context. - message: The Firebase
RemoteMessage. Mobile Core passes it asAnyso that Mobile Core does not depend on Firebase.