MoEPushHelper

Helper class for push related hooks.

Author

Umang Chamaria

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Register a listener to receive a callback whenever user responds to the permission request.

Link copied to clipboard

Checks whether the FCM message was being delivered from the MoEngage Platform or not

Link copied to clipboard
fun isSilentPush(@NonNull pushPayload: Map<String, String>): Boolean

Checks if the given payload is a Silent Notification or not.

Link copied to clipboard
fun logNotificationClick(context: Context, intent: Intent)

Track notification click. Make sure the intent has the push notification payload received Firebase as intent extras.

fun logNotificationClick(context: Context, payload: Bundle)

Track notification click. Make sure the bundle has the push notification payload received from Firebase.

Link copied to clipboard
fun logNotificationReceived(context: Context, payload: Map<String, String>)
fun logNotificationReceived(context: Context, notificationPayload: Map<String, String>, appId: String)

Tracks notification impression.

Link copied to clipboard

Navigates the user to the Notification settings on Android 8 or above, on older versions the user is navigated the application settings or application info screen.

Link copied to clipboard
fun pushPermissionResponse(context: Context, isGranted: Boolean)

Notify the SDK on notification permission granted to the application.

Link copied to clipboard

Register a listener for Push notification callback and tweaking for the account configured as default.

fun registerMessageListener(pushMessageListener: PushMessageListener, appId: String)

Register a listener for Push notification callback and tweaking for the given account.

Link copied to clipboard

Requests the push permission on Android 13 and above.

Link copied to clipboard

API to create default MoEngage SDK channels.

Link copied to clipboard

Updates the Notification request attempt count, the request attempt count will be incremented by the passed fresh count.