Created
June 27, 2018 19:21
-
-
Save amadeu01/c7c78400b1ce1774c3263ce45c340d1d 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 FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService { | |
@Override | |
public void onMessageReceived(RemoteMessage remoteMessage) { | |
super.onMessageReceived(remoteMessage); | |
try { | |
if (remoteMessage.getData().size() > 0) { | |
// do stuff..... | |
} | |
if (remoteMessage.getNotification() != null) { | |
Timber.d("Message Notification Body: %s", remoteMessage.getNotification().getBody()); | |
} | |
} catch (Exception exception) { | |
Timber.e(exception); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Não esquece de colocar no
Manifest