How to disable the Recent Tasks/Apps button in Android
<p>I'm building a child play application for Android. I need to disable all keys when it is in use.
I have set the Application as the Home App and disabled the back key (that takes care of the Home and Back button).
In order to clear the recent tasks list I've created a list of Dummy Activites which start and then finish when the application starts. The Dummy Activites look like:</p>

<pre><code>public class Dummy1 extends Activity
{
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
   finish();
}
}
</code></pre>

<p>And then in my onCreate of the application I perform:</p>

<pre><code>this.pm.setComponentEnabledSetting(new ComponentName(this, Dummy1.class),   PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);

Intent localIntent1 = new Intent(this, Dummy1.class);
localIntent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(localIntent1); 
</code></pre>

<p>This takes care of when someone tries to hold the Home key to display the recent tasks as I create 8 of these and they're all empty so the user can't click to change apps.</p>

<p>Now the only button I can't seem to disable is the "Recent Tasks/Apps" button (available mainlyon HTC devices, ie. One X, One S, etc). This button seems to still bring up all the recent tasks(even though my dummy tasks were created) and I can't seem to find a "hook" for the event that is fired when this button is pressed? Any help or suggestions would be greatly appreciated.</p>

<p>Note: I know it's do-able since apps like ToddlerLock have done it....I just can't seem to figure it out.</p>

<p>Thanks in Advance!</p>
