Created
July 12, 2017 10:28
-
-
Save ismaeltoe/a8d0457d48cd34d74cf79d16e89c0939 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyFirebaseMessagingService extends FirebaseMessagingService { | |
private static final String TAG = MyFirebaseMessagingService.class.getSimpleName(); | |
@Override | |
public void onMessageReceived(RemoteMessage remoteMessage) { | |
if (remoteMessage.getData() != null && remoteMessage.getData().size() > 0) { | |
Map<String, String> data = remoteMessage.getData(); | |
Log.d(TAG, data.toString()); | |
} | |
if (remoteMessage.getNotification() != null) { | |
Log.d(TAG, remoteMessage.getNotification().getBody()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment