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 notified whenever in-app is shown, closed. This API registers callback for the account configured as default.

fun addInAppLifeCycleListener(appId: String, @NonNull listener: InAppLifeCycleListener)

Register a callback to be notified whenever in-app is shown, closed. This API registers callback for the given account.

disableActivityRegistrationOnResume
Link copied to clipboard
fun disableActivityRegistrationOnResume()

API to disable Activity registration in android.app.Activity.onResume

enableActivityRegistrationOnResume
Link copied to clipboard
fun enableActivityRegistrationOnResume()

API to enable Activity registration in android.app.Activity.onResume

getSelfHandledInApp
Link copied to clipboard
fun getSelfHandledInApp(@NonNull context: Context, @NonNull listener: SelfHandledAvailableListener)

Fetch Self Handled campaign for the account configured as default.

fun getSelfHandledInApp(@NonNull context: Context, @NonNull appId: String, @NonNull listener: SelfHandledAvailableListener)

Fetch Self Handled campaign for the given account.

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.

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

Remove a registered listener for the account configured as default.

fun removeInAppLifeCycleListener(@NonNull appId: String, @NonNull listener: InAppLifeCycleListener)

Remove a registered listener for the given account.

resetInAppContext
Link copied to clipboard
fun resetInAppContext()

Resets the user context set for inapp. This API resets the context for the account configured as default.

fun resetInAppContext(appId: String)

Resets the user context set for inapp. This API resets the context for the given account.

selfHandledClicked
Link copied to clipboard
fun selfHandledClicked(@NonNull context: Context, @NonNull data: SelfHandledCampaignData)

Mark self-handled campaign as clicked for the account configured as default.

fun selfHandledClicked(@NonNull context: Context, @NonNull data: SelfHandledCampaignData, @NonNull widgetId: Int)

Mark self-handled campaign as clicked with a given id for the account configured as default.

fun selfHandledClicked(@NonNull context: Context, @NonNull data: SelfHandledCampaignData, @NonNull appId: String)

Mark self-handled campaign as clicked for the given instance.

fun selfHandledClicked(@NonNull context: Context, @NonNull data: SelfHandledCampaignData, widgetId: Int, @NonNull appId: String)

Mark self-handled campaign as clicked with a given id for the given instance.

selfHandledDismissed
Link copied to clipboard
fun selfHandledDismissed(@NonNull context: Context, @NonNull data: SelfHandledCampaignData)

Mark self handled campaign as dismissed for the account configured as default.

fun selfHandledDismissed(@NonNull context: Context, @NonNull data: SelfHandledCampaignData, @NonNull appId: String)

Mark self handled campaign as dismissed for the given account.

selfHandledShown
Link copied to clipboard
fun selfHandledShown(@NonNull context: Context, @NonNull data: SelfHandledCampaignData)

Mark self-handled campaign as shown for the account configured as default.

fun selfHandledShown(@NonNull context: Context, @NonNull data: SelfHandledCampaignData, @NonNull appId: String)

Mark self-handled campaign as shown for the given account.

setClickActionListener
Link copied to clipboard
fun setClickActionListener(listener: OnClickActionListener?)

Set a listener for in-app click,listener is only called if the action is of type Navigation. This API is sets a listener for the account configured as default.

fun setClickActionListener(appId: String, listener: OnClickActionListener?)

Set a listener for in-app click,listener is only called if the action is of type Navigation. This API is sets a listener for the given account.

setInAppContext
Link copied to clipboard
fun setInAppContext(contexts: Set<String>)

Set the user context in which In-App should be shown for the account configured as default.

fun setInAppContext(contexts: Set<String>, appId: String)

Set the user context in which In-App should be shown for the given account.

setSelfHandledListener
Link copied to clipboard
fun setSelfHandledListener(listener: SelfHandledAvailableListener?)

Set a listener for receiving callback for event triggered self-handled campaign. This API is sets a listener for the account configured as default.

fun setSelfHandledListener(appId: String, listener: SelfHandledAvailableListener?)

Set a listener for receiving callback for event triggered self-handled campaign. This API is sets a listener for the given account.

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

Try to show an In-App Message for the account configured as default.

fun showInApp(@NonNull context: Context, @NonNull appId: String)

Try to show an In-App Message for the given account.