MoEInAppHelper

class MoEInAppHelper

Helper class for InApp Related features.

Author

Umang Chamaria

Types

Companion
Link copied to clipboard
object Companion

Functions

addInAppLifeCycleListener
Link copied to clipboard
fun addInAppLifeCycleListener(@NonNull listener: InAppLifeCycleListener)

Register a callback to be get notified whenever in-app is shown, closed.

getInAppLifeCycleListeners
Link copied to clipboard

Returns set of InAppMessageListener listeners. Add the listener using MoEInAppHelper.addInAppLifeCycleListener.

getListener
Link copied to clipboard
fun getListener(): InAppMessageListener

Returns instance of InAppMessageListener listener is set by MoEInAppHelper.registerListener else null.

getSelfHandledInApp
Link copied to clipboard
fun getSelfHandledInApp(context: Context)

Try to return a self handled in-app to the callback listener. Ensure self handled in-app listener is set before you call this.

onConfigurationChanged
Link copied to clipboard
fun onConfigurationChanged()

Notify SDK when screen orientation changes, for SDK to handle in-app display. NOTE: Use this API only when your Activity handles the screen orientation change by itself.

registerListener
Link copied to clipboard
fun registerListener(@NonNull listener: InAppMessageListener)

Register a callback to be get notified whenever in-app is shown, clicked, closed.

selfHandledClicked
Link copied to clipboard
fun selfHandledClicked(context: Context, campaign: MoEInAppCampaign)
fun selfHandledClicked(context: Context, campaign: MoEInAppCampaign, widgetId: Int)

Mark self-handled campaign as clicked.

selfHandledDismissed
Link copied to clipboard
fun selfHandledDismissed(context: Context, campaign: MoEInAppCampaign)

Notify the SDK that self-handled campaign has been dismissed.

selfHandledPrimaryClicked
Link copied to clipboard
fun selfHandledPrimaryClicked(context: Context, campaign: MoEInAppCampaign)

Mark self-handled campaign as primary clicked.

selfHandledShown
Link copied to clipboard
fun selfHandledShown(context: Context, campaign: MoEInAppCampaign)

Mark self-handled campaign as shown.

showInApp
Link copied to clipboard
fun showInApp(context: Context)

Try to show a In-App Message