Created
June 27, 2018 19:20
-
-
Save amadeu01/ad0f58af4a48ac112991a5e705525e95 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 FirebaseMessagingHelper extends FirebaseInstanceIdService { | |
static public String token; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
token = FirebaseInstanceId.getInstance().getToken(); | |
if(token != null) Timber.d("Token %s", token); | |
} | |
@Override | |
public void onTokenRefresh() { | |
token = FirebaseInstanceId.getInstance().getToken(); | |
} | |
} |
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