catch more firebase library bugs
This commit is contained in:
parent
b519d6370b
commit
611f28fbd0
1 changed files with 8 additions and 1 deletions
|
@ -146,7 +146,14 @@ public class PushManagementService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrieveFcmInstanceToken(final OnGcmInstanceTokenRetrieved instanceTokenRetrieved) {
|
private void retrieveFcmInstanceToken(final OnGcmInstanceTokenRetrieved instanceTokenRetrieved) {
|
||||||
FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(task -> {
|
final FirebaseInstanceId firebaseInstanceId;
|
||||||
|
try {
|
||||||
|
firebaseInstanceId = FirebaseInstanceId.getInstance();
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
Log.d(Config.LOGTAG, "unable to get firebase instance token ", e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
firebaseInstanceId.getInstanceId().addOnCompleteListener(task -> {
|
||||||
if (!task.isSuccessful()) {
|
if (!task.isSuccessful()) {
|
||||||
Log.d(Config.LOGTAG, "unable to get Firebase instance token", task.getException());
|
Log.d(Config.LOGTAG, "unable to get Firebase instance token", task.getException());
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue