Created
December 4, 2017 06:34
-
-
Save andrisasuke/9609a7698d6f10c2298f866130ee2b67 to your computer and use it in GitHub Desktop.
Get firebase_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
public class OyFirebaseInstanceIdService extends FirebaseInstanceIdService { | |
private static final String TAG = "OyFirebaseIis"; | |
@Inject | |
LocalPreferences localPreferences; | |
private CompositeSubscription subscriptions; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
AndroidInjection.inject(this); | |
subscriptions = new CompositeSubscription(); | |
} | |
@Override | |
public void onTokenRefresh() { | |
String refreshedToken = FirebaseInstanceId.getInstance().getToken(); | |
Log.d(TAG, "token: " + refreshedToken); | |
//sendRegistrationToServer(refreshedToken); | |
//or store to local cache | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment