what about
android:launchMode="singleTask"
or
android:launchMode="singleInstance"
in your manifest? i think singleTask
is the one you want, but im still not crystal clear on what you are doing.
"The system creates the activity at the root of a new task and routes the intent to it. However, if an instance of the activity already exists, the system routes the intent to existing instance through a call to its onNewIntent() method, rather than creating a new one."
singleTask
@Override
void onPause() {
super.onPause();
finish();
}
dev docs: Acitvity Lifecycle
, Finish
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…