I am trying to delete FirebaseInstanceId when user logs out. It works fine when user is online.
But it gives Exception error when user is offline. Should I schedule it for handling when user is online?
FirebaseMessaging.getInstance().setAutoInitEnabled(false);
new Thread() {
@Override
public void run() {
try {
FirebaseInstanceId.getInstance().deleteInstanceId();
} catch (IOException e) {
Log.e("FCMERROR",e.getLocalizedMessage());
}
}
}.start();
It throws single line Exception
java.net.UnknownHostException: Unable to resolve host "firebaseinstallations.googleapis.com": No address associated with hostname