Reputation: 57166
I'm developing a SDK with a single Activity that's started with the following flags:
FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_SINGLE_TOP | FLAG_ACTIVITY_CLEAR_TOP | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
Everything works as expected (i.e. there's a single instance of the Activity that receives all Intents; the user can't navigate back to it) except for one case.
If I start the Activity & then finish the one that started it, the app disappears from the recent apps list.
How do I prevent that from happening?
Upvotes: 0
Views: 199
Reputation: 57166
Specifying android:taskAffinity="org.example.app"
fixed the issue.
Upvotes: 0
Reputation: 14590
Becuase of this flag its not appearing.
FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
Remove it and try..
if you mentioned above flag then The App will not shown in the recent Apps list..
Upvotes: 2