4

I want to hide my android app from (and only from) the menu that appears when long holding the HOME-button after it is finished. Is there a way to do that? Calling finish() programatically dont do the trick.

There are many threads about hiding an app from the launcher and taskmanager, but this is not what I want, I simply dont want it to show up in this "app history".

best regards Sebastian

1 Answer 1

10

Add android:excludeFromRecents="true" to any <activity> element in the manifest for any activity that should not appear in the recent tasks list.

3
  • Used this solution to avoid user from re-entering a from-notification-only activity. Seems to be the only thing doing the trick, thanks!
    – gardarh
    Jul 2, 2012 at 23:21
  • @commonsware: How to clear recents list while long-pressing home button ? Jan 23, 2013 at 16:04
  • @Sebastian, you should accept this answer. Works like a charm. The only problem is when long-pressing the home button while STILL in the app. My Nexus 5 still shows it in recents, but it's a broken link -- as if the recents were deleted right after rendering the recents table. Probably an android bug.
    – CompEng88
    Oct 3, 2014 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.