Android Programming Press on the image to return to the main documentation page.

FirebaseNotifications

List of types:

FirebaseMessaging
RemoteMessage

FirebaseMessaging


Events:

TokenRefresh (Token As String)
MessageArrived (Message As RemoteMessage)

Members:


  HandleIntent (Intent As android.content.Intent) As Boolean

  Initialize (EventName As String)

  IsInitialized As Boolean

  SubscribeToTopic (Topic As String)

  Token As String [read only]

  UnsubscribeFromTopic (Topic As String)

Members description:

HandleIntent (Intent As android.content.Intent) As Boolean
Should be called from Service_Start. Returns true if the intent was handled.
Initialize (EventName As String)
IsInitialized As Boolean
SubscribeToTopic (Topic As String)
Subscribes to the specified topic.
Example:
fm.SubscribeToTopic("general")
Token As String [read only]
Returns the device token. The token can change from time to time. The TokenRefresh event is raised when the token changes.
The token is only needed when sending messages to a specific device.
UnsubscribeFromTopic (Topic As String)
Unsubscribes from a topic.

RemoteMessage

Holds the push message data.

Events:

None

Members:


  CollapseKey As String [read only]

  From As String [read only]

  GetData As Map

  IsInitialized As Boolean

  MessageId As String [read only]

  SentTime As Long [read only]

Members description:

CollapseKey As String [read only]
Gets the collapse key (if set).
From As String [read only]
Returns the sender id or the topic name. In the later case the value will start with /topics/
GetData As Map
Returns a Map with the key / values set as the message data.
IsInitialized As Boolean
MessageId As String [read only]
Gets the message id.
SentTime As Long [read only]
Returns the time the message was sent.
Top