MoEngageNotificationUtils

class MoEngageNotificationUtils

Utility class for Notifications sent from MoEngage platform.

Author

MoEngage (abhishek@moengage.com)

Functions

addAttributesToProperties
Link copied to clipboard
open fun addAttributesToProperties(payload: Bundle, properties: Properties)
addNotificationToInboxIfRequired
Link copied to clipboard
open fun addNotificationToInboxIfRequired(context: Context, extras: Bundle)
convertBundleToJsonString
Link copied to clipboard
open fun convertBundleToJsonString(newBundle: Bundle): String
deleteImagesIfRequired
Link copied to clipboard
open fun deleteImagesIfRequired(context: Context, payload: Bundle)
getIntentForSnooze
Link copied to clipboard
open fun getIntentForSnooze(context: Context, payloadBundle: Bundle, notificationId: Int): Intent
getRedirectIntent
Link copied to clipboard
open fun getRedirectIntent(context: Context, payloadBundle: Bundle, notificationId: Int): Intent
isNotificationChannelExists
Link copied to clipboard
open fun isNotificationChannelExists(context: Context, channelId: String): Boolean
isReNotification
Link copied to clipboard
open fun isReNotification(extras: Bundle): Boolean
Helper method to check if Notification has to be shown again
logNotificationClick
Link copied to clipboard
open fun logNotificationClick(context: Context, intent: Intent)
logNotificationImpression
Link copied to clipboard
open fun logNotificationImpression(context: Context, extras: Bundle)
scaleLandscapeBitmap
Link copied to clipboard
open fun scaleLandscapeBitmap(context: Context, imageBitmap: Bitmap): Bitmap
transformToPx
Link copied to clipboard
open fun transformToPx(context: Context, dp: Int): Int
updateClickToInbox
Link copied to clipboard
open fun updateClickToInbox(context: Context, pushPayload: Bundle)
Marks the notification as clicked.