Yes, generally when you want to have special properties for an Activity
when starting it you supply special flags to the Intent
. In this case FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
.
Updated:
If you need to hide the current already running activity, you might be able to use this flag in combination with FLAG_ACTIVITY_CLEAR_TOP
which would send the new Intent to the existing Activity
. You'll have to think and perhaps experiment with what happens as the user moves around your stack though and whether that will make your app re-appear in the recent apps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…