Package com.moengage.core

Types

DataCenter
Link copied to clipboard
enum DataCenter : Enum<DataCenter>

Supported Data Centers

LogLevel
Link copied to clipboard
@Retention(value = SOURCE)
annotation class LogLevel
Supported Log levels
MoECoreHelper
Link copied to clipboard
object MoECoreHelper

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

MoEngage
Link copied to clipboard
class MoEngage

Initialise MoEngage SDK using this class.

Properties
Link copied to clipboard
class Properties

A helper class for building attributes

Functions

configureJavascriptUsage
Link copied to clipboard
fun configureJavascriptUsage(config: JavaScriptConfig)

API to configure Javascript usage in WebView

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

API to disable Advertising Id tracking for the account configured as default.

fun disableAdIdTracking(context: Context, appId: String)

API to disable Advertising Id tracking for the given instance.

disableAllLogs
Link copied to clipboard
fun disableAllLogs()

API to completely disable SDK related logs.

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

API to disable Android-id tracking for the account configured as default.

fun disableAndroidIdTracking(context: Context, appId: String)

API to disable Android-id tracking for the given instance.

disableDataTracking
Link copied to clipboard
fun disableDataTracking(context: Context)
fun disableDataTracking(@NonNull context: Context, @NonNull appId: String)

Optionally opt-out of data tracking. When data tracking is opted out no custom event or user attribute is tracked on MoEngage Platform.

disableDeviceIdTracking
Link copied to clipboard
fun disableDeviceIdTracking(context: Context, appId: String? = null)

Disables Device-id tracking.

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

API to disable all features of the SDK for the account configured as default.

fun disableSdk(context: Context, appId: String)

API to disable all features of the SDK.

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

API to enable Advertising Id tracking for the account configured as default.

fun enableAdIdTracking(context: Context, appId: String)

API to enable Advertising Id tracking for the given instance.

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

API to enable Android-id tracking for the account configured as default.

fun enableAndroidIdTracking(context: Context, appId: String)

API to enable Android-id tracking for the given instance.

enableDataTracking
Link copied to clipboard
fun enableDataTracking(context: Context)
fun enableDataTracking(context: Context, appId: String)

API to enable data tracking.

enableDeviceIdTracking
Link copied to clipboard
fun enableDeviceIdTracking(context: Context, appId: String? = null)

Enable Device-id tracking. It is enabled by default, should be called only if tracking is disabled at some point.

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

API to enable SDK usage for the account configured as default.

fun enableSdk(context: Context, appId: String)

API to enable SDK usage for the given account.

isAppForeground
Link copied to clipboard
fun isAppForeground(): Boolean

Returns if the application is in foreground or background.

isSdkEnabled
Link copied to clipboard
fun isSdkEnabled(context: Context, appId: String? = null): Boolean

Returns the current state of the SDK, i.e. whether it is enabled or disabled. Optionally pass in the account identifier to get the status for a specific account. If you only have the default instance configured appId parameter can be ignored.

isSdkInitialised
Link copied to clipboard
fun isSdkInitialised(): Boolean

Checks if the SDK is initialised post current process creation with any account marked as default.

fun isSdkInitialised(appId: String): Boolean

Checks if the SDK is initialised post current process creation with the specified account identifier.

Properties

MOENGAGE_ACCOUNT_IDENTIFIER
Link copied to clipboard
const val MOENGAGE_ACCOUNT_IDENTIFIER: String

Key used for MoEngage Account Identifier in campaign payloads and intent extras.

PUSH_NOTIFICATION_CAMPAIGN_ID
Link copied to clipboard
const val PUSH_NOTIFICATION_CAMPAIGN_ID: String

Key used for unique campaign identifier in the Push Campaign.

PUSH_NOTIFICATION_COUPON_CODE
Link copied to clipboard
const val PUSH_NOTIFICATION_COUPON_CODE: String

Key used for coupon code in the Push Campaign.

PUSH_NOTIFICATION_FROM_MOENGAGE
Link copied to clipboard
const val PUSH_NOTIFICATION_FROM_MOENGAGE: String

Key used for identifying sending platform in the Push Campaign.

PUSH_NOTIFICATION_IMAGE_URL
Link copied to clipboard
const val PUSH_NOTIFICATION_IMAGE_URL: String

Key used for image in the Push Campaign.

PUSH_NOTIFICATION_MESSAGE
Link copied to clipboard
const val PUSH_NOTIFICATION_MESSAGE: String

Key used for notification message in the Push Campaign.

const val PUSH_NOTIFICATION_MOENGAGE_CONFIRMATION_VALUE: String

Value for identifying Push Campaign from MoEngage platform.

const val PUSH_NOTIFICATION_NAVIGATION_ACTIVITY_NAME: String

Key used for screen name or activity name in the Push Campaign.

PUSH_NOTIFICATION_NAVIGATION_DEEPLINK
Link copied to clipboard
const val PUSH_NOTIFICATION_NAVIGATION_DEEPLINK: String

Key used for deeplink in the Push Campaign.

const val PUSH_NOTIFICATION_NAVIGATION_DEEPLINK_LEGACY: String

Key used for legacy deeplink in the Push Campaign.

PUSH_NOTIFICATION_SHOW_DIALOG
Link copied to clipboard
const val PUSH_NOTIFICATION_SHOW_DIALOG: String
PUSH_NOTIFICATION_SUMMARY
Link copied to clipboard
const val PUSH_NOTIFICATION_SUMMARY: String

Key used for notification summary in the Push Campaign.

PUSH_NOTIFICATION_TITLE
Link copied to clipboard
const val PUSH_NOTIFICATION_TITLE: String

Key used for notification title in the Push Campaign.

PUSH_NOTIFICATION_TYPE
Link copied to clipboard
const val PUSH_NOTIFICATION_TYPE: String

Key used for type of notification in the Push Campaign.

const val PUSH_NOTIFICATION_TYPE_DEEP_LINK_NOTIFICATION: String

Value for notification type when the navigation has deeplink or http(s) url in the Push Campaign.

const val PUSH_NOTIFICATION_TYPE_NORMAL_NOTIFICATION: String

Value for notification type when navigation has screen name in the Push Campaign.

const val PUSH_NOTIFICATION_TYPE_SILENT_NOTIFICATION: String

Value for notification type for Silent notification.