Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Updating documentation to use FCM instead of GCM, full functionality on FCM has been verified
  • Loading branch information
silus03 committed May 12, 2017
1 parent 3ed35b8 commit ff11a48
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -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<String, String> entry : remoteMessage.getData().entrySet()) {
data.putString(entry.getKey(), entry.getValue());
}

NotificationsManager.presentNotification(
this,
data,
Expand Down

0 comments on commit ff11a48

Please sign in to comment.