MoECoreHelper

object MoECoreHelper

Helper class to access the core APIs for the MoEngage SDK.

Since

12.0.00

Author

Umang Chamaria

Functions

addAppBackgroundListener
Link copied to clipboard
fun addAppBackgroundListener(@NonNull listener: AppBackgroundListener)

Add a listener to get a callback on application background for the account configured as default.

fun addAppBackgroundListener(@NonNull appId: String, @NonNull listener: AppBackgroundListener)

Add a listener to get a callback on application background for the given account.

addLogoutCompleteListener
Link copied to clipboard
fun addLogoutCompleteListener(@NonNull listener: OnLogoutCompleteListener)

Add a listener to get a callback on logout complete for the account configured as default

fun addLogoutCompleteListener(@NonNull appId: String, @NonNull listener: OnLogoutCompleteListener)

Add a listener to get a callback on logout complete for the given instance.

getInstanceIdentifierFromBundle
Link copied to clipboard
fun getInstanceIdentifierFromBundle(@NonNull bundle: Bundle): String?

Returns the account identifier in the payload if present.

getInstanceIdentifierFromMap
Link copied to clipboard
fun getInstanceIdentifierFromMap(@NonNull map: Map<String, String>): String?

Returns the account identifier in the payload if present.

logoutUser
Link copied to clipboard
fun logoutUser(@NonNull context: Context)

Notify the SDK that the user has logged out of the application for the account configured as default

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

Notify the SDK that the user has logged out of the application for the given instance.

registerPreProcessingListener
Link copied to clipboard
fun registerPreProcessingListener(@NonNull appId: String, @NonNull listener: IntentPreProcessingListener)

Add a listener to get a callback the SDK tries to process an incoming intent.

removeAppBackgroundListener
Link copied to clipboard
fun removeAppBackgroundListener(@NonNull listener: AppBackgroundListener)

Remove application background listener for the account configured as default.

fun removeAppBackgroundListener(@NonNull appId: String, @NonNull listener: AppBackgroundListener)

Remove application background listener for the given account.

removeLogoutListener
Link copied to clipboard
fun removeLogoutListener(@NonNull listener: OnLogoutCompleteListener)

Remove logout listener for the account configured as default.

fun removeLogoutListener(@NonNull appId: String, @NonNull listener: OnLogoutCompleteListener)

Remove logout listener for the given account.

syncInteractionData
Link copied to clipboard
fun syncInteractionData(@NonNull context: Context)

Immediately sync tracked data with MoEngage Server for the account configured as default.

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

Immediately sync tracked data with MoEngage Server for the given account.

unRegisterPreProcessingListener
Link copied to clipboard
fun unRegisterPreProcessingListener(@NonNull appId: String, @NonNull listener: IntentPreProcessingListener)

Remove listener to get a callback the SDK tries to process an incoming intent.