RemoteMessage.Notification

class RemoteMessage.Notification


Remote Firebase notification details.

This class maps to the fields of a notification message.

Summary

Public functions

Array<String!>?

Gets the variable string values to be used as format specifiers in the body localization key, or null if not set.

String?

Gets the string resource name to use to localize the body of the notification, or null if not set.

Boolean

Gets whether or not the notification uses the default vibrate pattern.

Uri?

Gets the image URL from the notification.

Array<String!>?

Gets the variable string values to be used as format specifiers in the title localization key, or null if not set.

String?

Gets the string resource name to use to localize the title of the notification, or null if not set.

Public functions

getBodyLocalizationArgs

fun getBodyLocalizationArgs(): Array<String!>?

Gets the variable string values to be used as format specifiers in the body localization key, or null if not set.

getBodyLocalizationKey

fun getBodyLocalizationKey(): String?

Gets the string resource name to use to localize the body of the notification, or null if not set.

getDefaultVibrateSettings

fun getDefaultVibrateSettings(): Boolean

Gets whether or not the notification uses the default vibrate pattern.

See details about defaultVibrateTimings in Firebase Cloud Messaging Reference: HTTP v1 API.

Returns
Boolean

true if it is set to true; Otherwise false.

getImageUrl

fun getImageUrl(): Uri?

Gets the image URL from the notification.

Returns
Uri?

The image URL if it was set, null otherwise.

getTitleLocalizationArgs

fun getTitleLocalizationArgs(): Array<String!>?

Gets the variable string values to be used as format specifiers in the title localization key, or null if not set.

getTitleLocalizationKey

fun getTitleLocalizationKey(): String?

Gets the string resource name to use to localize the title of the notification, or null if not set.

Public properties

body

val body: String!

channelId

val channelId: String!

clickAction

val clickAction: String!

color

val color: String!

defaultLightSettings

val defaultLightSettings: Boolean

defaultSound

val defaultSound: Boolean

eventTime

val eventTime: Long!

icon

val icon: String!

lightSettings

val lightSettings: IntArray<Int>!

link

val link: Uri!

localOnly

val localOnly: Boolean

notificationCount

val notificationCount: Int!

notificationPriority

val notificationPriority: Int!

sound

val sound: String!

sticky

val sticky: Boolean

tag

val tag: String!

ticker

val ticker: String!

title

val title: String!

vibrateTimings

val vibrateTimings: LongArray<Long>!

visibility

val visibility: Int!