Created
June 3, 2016 19:02
-
-
Save alfongj/44bdab03de37224c44a274bfb35e7b6b 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
FirebaseUser user = mAuth.getCurrentUser(); // mAuth is your current firebase auth instance | |
user.getToken(true).addOnCompleteListener(this, new OnCompleteListener<GetTokenResult>() { | |
@Override | |
public void onComplete(@NonNull Task<GetTokenResult> task) { | |
if (task.isSuccessful()) { | |
Log.d(TAG, "token=" + task.getResult().getToken()); | |
} else { | |
Log.e(TAG, "exception=" +task.getException().toString()); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment