Created
January 26, 2017 15:59
-
-
Save kundansviet/f50e1a78fa50a3407901915ff2b80e24 to your computer and use it in GitHub Desktop.
class to access registration token
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
package com.cb.androidwarriorfcmdemo; | |
import android.util.Log; | |
import com.google.firebase.iid.FirebaseInstanceId; | |
import com.google.firebase.iid.FirebaseInstanceIdService; | |
/** | |
* Created by kundan on 1/26/2017. | |
*/ | |
public class MyInstanceIdService extends FirebaseInstanceIdService { | |
@Override | |
public void onTokenRefresh() { | |
super.onTokenRefresh(); | |
String refreshedToken = FirebaseInstanceId.getInstance().getToken(); | |
Log.d("fcmtoken", "Refreshed token: " + refreshedToken); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment