Companion

object Companion

Properties

Link copied to clipboard
const val DEFAULT_CHANNEL_ID: String

The channel id of the default notification channel created be the SDK.

Link copied to clipboard

The channel id of the default foreground notification channel created be the SDK.

Link copied to clipboard
const val TAG: String

Functions

Link copied to clipboard
fun addMessage(intent: Intent, message: NotificationMessage): Intent
Link copied to clipboard
fun cancelNotificationMessage(context: Context, message: NotificationMessage?)

Will cancel the notification associated with the provided message.

Link copied to clipboard
fun createDefaultNotificationChannel(context: Context): String

Will create the default notification channel used by the SDK only if it does not already exist.

fun createDefaultNotificationChannel(context: Context, forceRecreate: Boolean): String

Will create the default notification channel used by the SDK.

Link copied to clipboard
fun createForegroundNotificationChannel(context: Context): String

Will create the foreground notification channel used by the SDK only if it does not already exist.

Link copied to clipboard
fun extractMessage(intent: Intent): NotificationMessage?

Extracts the NotificationMessage from the Intent.

Link copied to clipboard
fun getDefaultNotificationBuilder(context: Context, message: NotificationMessage, channelId: String, @DrawableRes smallIconResId: Int): NotificationCompat.Builder

This method will build out a NotificationCompat.Builder with the defaults typically used by the SDK. It will set the following:

Link copied to clipboard
fun redirectIntentForAnalytics(context: Context, openIntent: PendingIntent, message: RemoteMessage, autoCancel: Boolean): PendingIntent?
fun redirectIntentForAnalytics(context: Context, openIntent: PendingIntent, message: NotificationMessage, autoCancel: Boolean): PendingIntent
fun redirectIntentForAnalytics(context: Context, openIntent: PendingIntent, message: NotificationMessage, autoCancel: Boolean, bundle: Bundle?): PendingIntent

Returns a PendingIntent that will redirect to our internal Service to handle notification opened analytics. Once the analytic has been logged it will redirect the application to the provided [ ].