I want to start another activity in finish()
depending on a condition. I got the same code working in onDestroy()
but I think this is not the right place from the lifecycle point of view.
(Activities might be destroyed, although there were not actively left by the user).
The following code did not have any effect:
@Override
public void finish() {
if (mCondition) {
Intent intent = new Intent(this, OtherActivity.class);
startActivity(intent);
}
super.finish();
}
Why is it not working, are there alternatives?