MoEFireBaseHelper

class MoEFireBaseHelper

Helper class for MoEngage Firebase Module.

Author

Umang Chamaria

Since

9.4.00

Types

Companion
Link copied to clipboard
object Companion

Functions

addNonMoEngagePushListener
Link copied to clipboard
fun addNonMoEngagePushListener(listener: NonMoEngagePushListener)

Register a listener to receive a callback whenever a push is received which isn't from MoEngage.

addTokenListener
Link copied to clipboard
fun addTokenListener(listener: TokenAvailableListener)

Register a listener to receive a callbacks whenever a token is generated or updated.

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

Get saved Push Token(if any) for the account configured as default.

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

Get saved Push Token(if any) for the given account.

passPushPayload
Link copied to clipboard
fun passPushPayload(context: Context, payload: Bundle)
fun passPushPayload(context: Context, payload: Map<String, String>)

Pass the payload received from FCM to the MoEngage SDK for showing Push Notification.

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

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

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

API to register for FCM Token. Call this API only if you are delaying the SDK initialisation else this is not required.

removeNonMoEngagePushListener
Link copied to clipboard
fun removeNonMoEngagePushListener(listener: NonMoEngagePushListener)

Remove a registered NonMoEngagePushListener

removeTokenListener
Link copied to clipboard
fun removeTokenListener(listener: TokenAvailableListener)

Remove registered TokenAvailableListener