RemoteMessage
@SafeParcelable.Reserved(value = [1])
@SafeParcelable.Class(creator = "RemoteMessageCreator")
class RemoteMessage : AbstractSafeParcelable
| kotlin.Any | ||
| ↳ | com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable | |
| ↳ | com.google.firebase.messaging.RemoteMessage |
A remote Firebase Message.
Messages will be received via onMessageReceived.
Messages may have a Notification instance if they are received while the application is in the foreground, otherwise they will be automatically posted to the notification tray.
Summary
Nested types |
|---|
class RemoteMessage.BuilderBuilder object for constructing |
@IntDef(value = )Priority of the message |
|
Remote Firebase notification details. |
Constants |
|
|---|---|
const Int |
PRIORITY_HIGH = 1 |
const Int |
PRIORITY_NORMAL = 2 |
const Int |
PRIORITY_UNKNOWN = 0 |
Public functions |
|
|---|---|
String? |
Gets the collapse key of the message. |
String? |
getFrom()Get the sender of this message. |
String? |
Gets the message's ID. |
String? |
Gets the type of message. |
Int |
Gets the original priority of message. |
Int |
Gets the priority of message as delivered. |
String? |
Gets the Sender ID for the sender of this message. |
Long |
Gets the time in milliseconds from the Epoch that the message was sent. |
String? |
This function is deprecated. This function is actually decommissioned along with all of FCM upstream messaging. |
Int |
getTtl()Gets the message time to live (TTL) in seconds. |
Unit |
writeToParcel(out: Parcel, flags: Int) |
Public properties |
|
|---|---|
(Mutable)Map<String!, String!>! |
|
RemoteMessage.Notification! |
Inherited functions |
|---|
Constants
Public functions
getCollapseKey
fun getCollapseKey(): String?
Gets the collapse key of the message.
| Returns | |
|---|---|
String? |
The collapse key |
getFrom
fun getFrom(): String?
Get the sender of this message.
This will be the sender ID or the topic for topic messages.
| Returns | |
|---|---|
String? |
The message sender |
getMessageId
fun getMessageId(): String?
Gets the message's ID.
This is automatically generated by the server. Treat it as an opaque string. Do not rely on its format to be consistent.
| Returns | |
|---|---|
String? |
The message ID |
getMessageType
fun getMessageType(): String?
Gets the type of message.
| Returns | |
|---|---|
String? |
The message type |
getOriginalPriority
@RemoteMessage.MessagePriority
fun getOriginalPriority(): Int
Gets the original priority of message.
| Returns | |
|---|---|
Int |
The original message priority |
getPriority
@RemoteMessage.MessagePriority
fun getPriority(): Int
Gets the priority of message as delivered. This may be lower than the priority originally requested.
| Returns | |
|---|---|
Int |
The message priority as delivered |
getSenderId
fun getSenderId(): String?
Gets the Sender ID for the sender of this message.
| Returns | |
|---|---|
String? |
the message Sender ID |
getSentTime
fun getSentTime(): Long
Gets the time in milliseconds from the Epoch that the message was sent.
| Returns | |
|---|---|
Long |
The time that the message was sent |