MessagingDelegate
in order to be alerted when specific events occur during the lifecycle of an in-app message.MobileCore
framework maintains an optional property that holds reference to the MessagingDelegate
.InAppMessagingHandler
is a class that implements MessagingDelegate
, execute the following code to set the delegate in MobileCore
:ServiceProvider
class maintains an optional property that holds reference to the FullscreenMessaageDelegate
.MessagingDelegate
protocol, which is implemented in the AEPServices
framework, is defined below:FullscreenMessageDelegate
interface, which is implemented in the Android Messaging extension in the MessagingDelegate
class, is defined below:MessagingDelegate
will be passed a Showable
object. In the AEPMessaging SDK, the class implementing Showable
is FullscreenMessage
. A FullscreenMessage
object is wrapped in the Message
class, and is your primary way to interact with the message.Message
object:Showable
message parameter to FullscreenMessage
parent
variable (note that parent
is variable defined in FullscreenMessage+Message.swift
, an extension in the AEPMessaging framework)Message
in the onShow
delegate method can be seen below:onShowFailure()
) in a FullscreenMessageDelegate
implementation will be passed an AEPMessage
object. An AEPMessage
object is the Android Core implementation of the FullscreenMessage
interface. It contains a reference to the parent Message
class and is your primary way to interact with the message.AEPMessage
object can be obtained by calling fullscreenMessage.getParent()
. An example of how to access the Message
in the onShow
delegate method can be seen below:MessagingDelegate
has been provided to MobileCore
, the delegate's shouldShowMessage
method will be called prior to displaying an in-app message for which the end user has qualified. You are responsible for returning true
if the message should be shown, or false
if the message should be suppressed.Message
object, and call the show()
method on it at a later time.FullscreenMessageDelegate
has been set in the ServiceProvider
, this delegate's shouldShowMessage
method will be called prior to displaying an in-app message for which the end user has qualified. You are responsible for returning true
if the message should be shown, or false
if the message should be suppressed.FullscreenMessage
object, and call the show()
method on it at a later time.View
that contains the UI for an in-app message, you can do so by accessing the WKWebView
directly in a MessagingDelegate
method.WKWebView
and return false
to prevent the message from being shown by the SDK:View
that contains the UI for an in-app message, you can do so by accessing the WebView
directly in a MessagingDelegate
method.WebView
and return false
to prevent the message from being shown by the SDK: