title: How to remove or kill an application from recent apps list?
body: <p>I'm developing an app which will be used by children.</p>
  
  <p>I took over the home button by making my app a launcher.
  Now I'm trying to take over the long press of the home button which brings up the recent apps list.</p>
  
  <p>I searched for and tried:</p>
  
  <ul>
  <li>taking over the button</li>
  <li>clearing the apps list</li>
  <li>killBackgroundProcesses() and Process.killProcess()</li>
  </ul>
  
  <p>I'm able to get the tasks by ActivityManager.getRunningTasks(), but I can't seem to clear it in any way.</p>
  
  <p>I've come across two possible solutions: </p>
  
  <ul>
  <li>listening to onWindowFocusChanged and Intent.ACTION_CLOSE_SYSTEM_DIALOGS => this is not an acceptable answer for my requirements</li>
  <li>doing it like ToddlerLock and flood the apps list with activities => this is a hack and in the future it might not work anymore</li>
  </ul>
  
  <p>Is there another possibility (except building a custom rom) or am I missing something?
  Thanks in advance!</p>
  
  <p>EDIT 1:
  I was able to kill other running processes but their entry remained in the recent apps list, so if you click it, it will just restart that application.
  Is there a way to refresh that list?</p>
  
  <p>EDIT 2:
  I tried to do it like ToddlerLock and followed the directions of <a href="https://stackoverflow.com/questions/6258980/altering-the-result-of-getrecenttasks">Robert's answer</a>.
  I've got 18 dummy activities running and showing in the recent apps list, but this doesn't block the possibility to click previous active apps.
  Any help?</p>