Reputation: 1162
I'm implementing an application locker for android. I have the following code in my onPause() of authentication activity where user has to enter his password.
@Override
protected void onPause() {
super.onPause();
blnSwitchingActivity = true;
Intent intent = new Intent();
intent.setAction(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME)
.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
finish();
}
The following scenario creates a problem.
My question: Why there is a delay in calling the home screen intent?
Upvotes: 0
Views: 198
Reputation: 2198
I'm not 100% sure of what your question is, but it sounds like some combination of android:noHistory=true
and android:excludeFromRecents=true
for the Activity
in your manifest would do the trick for you.
Upvotes: 1