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.
== 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.
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.