MoEMiPushHelper

class MoEMiPushHelper

Helper class for MoEngage Mi Push Module

Author

Umang Chamaria

Since

2.0.00

Types

Companion
Link copied to clipboard
object Companion

Functions

getPushToken
Link copied to clipboard
fun getPushToken(@NonNull context: Context): String?

Fetch the push token for the default instance if available for the account configured as default.

fun getPushToken(@NonNull context: Context, @NonNull appId: String): String?

Fetch the push token for the specified instance if available for the given account.

hasMiUi
Link copied to clipboard
fun hasMiUi(): Boolean

Helper API to check whether device has MIUI installed.

logNotificationClicked
Link copied to clipboard
fun logNotificationClicked(context: Context, payload: Bundle)

Track notification click. Make sure the Bundle has the push notification payload received from Mi Service.

onNotificationClicked
Link copied to clipboard
fun onNotificationClicked(context: Context, payload: Bundle)
passPushPayload
Link copied to clipboard
fun passPushPayload(context: Context, payload: Bundle)
passPushToken
Link copied to clipboard
fun passPushToken(@NonNull context: Context, @NonNull pushToken: String)

Helper API to pass the push token to the MoEngage platform for the account configured as default.

fun passPushToken(@NonNull context: Context, @NonNull pushToken: String, @NonNull appId: String)

Helper API to pass the push token to the MoEngage platform for the given account.

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

Set the region in which the Mi data reside.

setRegistrationAccount
Link copied to clipboard
fun setRegistrationAccount(@NonNull appId: String)

Sets the Account whose config should be used for token registration.