Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between autoRemoveFromRecents and excludeFromRecents

I have gone through android docs but unable to get clear idea about these tags? When should I use autoRemoveFromRecents and excludeFromRecents?

like image 758
dreamcoder Avatar asked Jun 05 '17 07:06

dreamcoder


1 Answers

autoRemoveFromRecents: Whether or not tasks launched by activities with this attribute remains in the overview screen until the last activity in the task is completed.

excludeFromRecents: Whether or not the task initiated by this activity should be excluded from the list of recently used applications, the overview screen.

In other words, autoRemoveFromRecents will allow the task to be in the overview screen, but will remove itself when the task is finished (i.e. all activities in stack finish()/onBackPressed()/etc.)

excludeFromRecents just never enters the overview screen in the first place.

like image 91
David Liu Avatar answered Oct 07 '22 23:10

David Liu