May I know what is the proper way to know whether an Activity has been destroyed? Currently, I am using the following way.
private volatile boolean isOnDestroyCalled = false;
@Override
protected void onDestroy() {
super.onDestroy();
isOnDestroyCalled = true;
}
public boolean isOnDestroyCalled() {
return this.isOnDestroyCalled;
}
Is there any other way better than the above?