0

I want to launch an Activity with an Intent instance like this :

intentListAlarmActivityWakeUpActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

this Activity finnish when i click on a button, but when i see in the overview screen (list of recent activities), i have not the task of my application. I want only exclude my activity, not the entiere task of my application.

I want to see this:

what i want to see

But i see that (the full task of my app disappears, not only the activity):

what i see

I don't understand the flag: Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS ?

it is only for the activity launched by the Intent instance, not the full task of my application, but the flag exclude the full task from the overview screen

Yass
  • 547
  • 1
  • 7
  • 14
  • @cricket_007 sorry i saw this post but i don't understand the solution, i need to add android:taskaffinity to my in the manifest, but why ? – Yass Mar 20 '16 at 16:24
  • 1
    You can also search what affinity is http://stackoverflow.com/questions/17872989/android-task-affinity-explanation – OneCricketeer Mar 20 '16 at 16:39
  • @cricket_007 Thanks a lot, it works and i understand now (Android dev. documentation speaks about) – Yass Mar 20 '16 at 16:42

0 Answers0