From f27756ecbce67a28c22e68259bedfd0135690f7f Mon Sep 17 00:00:00 2001 From: silus03 Date: Mon, 27 Feb 2017 11:52:54 -0500 Subject: [PATCH] Update README.md Updating documentation to say FCM instead of GCM, full functionality on FCM has been verified --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f7deac0..d4dbef4 100644 --- a/README.md +++ b/README.md @@ -72,11 +72,16 @@ To get started on Android, add the following to your gradle dependencies: compile 'com.facebook.android:notifications:1.+' ``` -After you've added the dependency, you'll have to [set up a GCM listener service](https://developers.google.com/cloud-messaging/android/client), and add the following to your service: +After you've added the dependency, you'll have to [set up an FCM listener service](https://firebase.google.com/docs/cloud-messaging/android/client), and add the following to your service: ```java @Override -public void onMessageReceived(String from, final Bundle data) { +public void onMessageReceived(RemoteMessage remoteMessage) { + Bundle data = new Bundle(); + for (Map.Entry entry : remoteMessage.getData().entrySet()) { + data.putString(entry.getKey(), entry.getValue()); + } + NotificationsManager.presentNotification( this, data,