title: Android - How can I disable home button temporarily and recreate what Car Home and Toddler Lock have done?
body: <p>So I'm trying to do what many people have tried before: create an app that does not respond to the Home button. I've looked at many of the similar questions posted here on SO, but none of worked the way I wanted them to.</p>
  
  <p>One thing I tried was making my app essentially another launcher. (Note: a little amount of user input is required to make it work.)</p>
  
  <p>From my application's Manifest:</p>
  
  <pre><code>&lt;category android:name="android.intent.category.DEFAULT" /&gt;       
  &lt;category android:name="android.intent.category.HOME" /&gt;
  </code></pre>
  
  <p>I also disabled the back button and made the launch mode "singleInstance."</p>
  
  <p>I think Toddler Lock did something similar, but my implementation does not behave exactly the same way. Using my implementation, my app exists as the default home launcher indefinitely including after the application has been exited. Is there any way to declare the same behavior in a place other than the Application Manifest where it can be turned on temporarily or and turned off when the app is exited?</p>
  
  <p>Car Home also does a similar thing and actually does it better than Toddler Lock. I'm not sure how it does it (maybe it has more permissions since it is a native app), but it manages to do the same thing without requiring the user to accept the alternate Launcher or choose the app as the default Launcher. Anyone have any idea on how it does it?</p>