Skip to content

Instantly share code, notes, and snippets.

@SeongUgJung
Created October 5, 2016 10:49
Show Gist options
  • Save SeongUgJung/c523b0d279cdc559ce19bb90c0262671 to your computer and use it in GitHub Desktop.
Save SeongUgJung/c523b0d279cdc559ce19bb90c0262671 to your computer and use it in GitHub Desktop.
fcm token is refreshed forcily
Completable.fromCallable(() -> {
try {
FirebaseInstanceId.getInstance().deleteInstanceId();
PushTokenRepository.getInstance().deleteGcmToken();
FirebaseInstanceId.getInstance().getToken();
} catch (IOException e) {
e.printStackTrace();
}
return Completable.complete();
}).subscribeOn(Schedulers.newThread())
.subscribe();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment