MoEInAppHelper

Helper class for InApp Related features.

Author

Umang Chamaria

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

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

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

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.

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.

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.

Link copied to clipboard

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.

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.

Link copied to clipboard

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

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

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.

Link copied to clipboard
@JvmOverloads
fun showNudge(@NonNull context: Context, appId: String? = null)
@JvmOverloads
fun showNudge(@NonNull context: Context, inAppPosition: InAppPosition, appId: String? = null)

Try to show a non-intrusive In-App nudge for the given account.