I am working on an application that needs to suppress the recent apps button as it is done in the Toddler Lock application. What I want is user should not be able to exit my application by pressing the recent apps button.
In toddler lock (https://play.google.com/store/apps/details?id=marcone.toddlerlock&hl=en) whenever you press the recent apps button the screen flashes a bit but the app return to its own activity. Even if we press the recent apps button multiple times in quick succession and manage to display the recent apps screen after a few milliseconds the app return to its own activity.
I know there must be some service that which is behind the scenes but i cannot exactly figure out.
Can anyone tell me how does the Toddler Lock application manages to suppress the recent apps button. I need to implement exactly same behavior in my application.
I tried the answer that is given on the link below: Altering the result of getRecentTasks
and android intercept recent apps button but these does not work on Android Lollipop.
If there is a way to do this using a home screen in my application please consider that as well.