Changes

Jump to: navigation, search

Firebase Cloud Messaging

66 bytes added, 30 August
no edit summary
Take this opportunity to cut and paste the token string into a safe place so that it can be referenced in the next section.
<htmlet>firebase_android</htmlet>
== Sending a Notification to the Device ==
When the onMessageReceived() method is called, it is passed as an argument a RemoteMessage object containing the details of a Firebase cloud message.
<htmlet>firebase_android</htmlet>
In the above code, the getFrom() method of the RemoteMessage object is called to identify where the message originated. The getNotification() method of the RemoteMessage object is called to access the RemoteMessage.Notification object and used to obtain both the title and notification body.

Navigation menu