MoEMiPushHelper

class MoEMiPushHelper

Helper class for MoEngage Mi Push Module

Author

Umang Chamaria Date: 2020/08/24

Since

2.0.00

Types

Companion
Link copied to clipboard
object Companion

Functions

addEventListener
Link copied to clipboard
fun addEventListener(@NonNull listener: MiPushEventListener)

Add an event listener to receive callbacks when MoEngage SDK's PushMessageReceiver is used.

hasMiUi
Link copied to clipboard
fun hasMiUi(): Boolean

Helper API to check whether device has MIUI installed.

isFromMoEngagePlatform
Link copied to clipboard
fun isFromMoEngagePlatform(message: MiPushMessage): Boolean

Helper API to check if the received message is from MoEngage Platform.

onNotificationClicked
Link copied to clipboard
fun onNotificationClicked(@NonNull context: Context, message: MiPushMessage)

Helper API to pass the click callback received from Mi to MoEngage. This API takes care of redirection as well. Do not add logic to redirect the user SDK will take care of it.

passPushPayload
Link copied to clipboard
fun passPushPayload(context: Context, message: MiPushMessage)

Helper API to pass the Pass Through Message from Mi.

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

Helper API to pass the push token to the MoEngage platform.

removeEventListener
Link copied to clipboard
fun removeEventListener(@NonNull listener: MiPushEventListener)

Remove an already added MiPushEventListener

setEventListener
Link copied to clipboard
fun setEventListener(listener: MiPushEventListener)

Set event listener to receive callbacks when the MoEngage SDK is handling push.