I have an app designed for a tablet in a workplace setting where a number of people will use the camera as part of their routine. While it's appropriate and necessary for a supervisor to leave the app, it should be difficult for other people to accidentally do so. However, a long press of the home key is pretty easy to do accidentally. I've done it myself. That brings up a list of recent tasks; the user can tap any one of them and they're lost, since some of them aren't as sophisticated as your average smartphone owner.
Programmatically you can retrieve this list via getRecentTasks. My question is how I can remove all but the most recent task (mine) from that list, reduce the length to just one element, or change the listed tasks to point back at my application. I know this is possible: Toddler Lock does it.
My first attempt was to modify the intents returned, in hopes they were passed by reference. No such luck. Any other ideas?
(I'm not talking about a short press of the home key. I already figured that one out, partially based on things found here.)