3

In Android how do I prevent the user from holding the home button to display recently launched apps?

I'm assuming I need to override the onKeyDown method or have an intent filter in the Android Manifest?

This is a duplicate of Home button disable

Community
  • 1
  • 1
David Silva Smith
  • 11,498
  • 11
  • 67
  • 91
  • 2
    Apparently you can't, by design. Even if you could, it would be a terrible design decision. See [here](http://stackoverflow.com/questions/1998278/android-capture-suppress-home-and-endcall-buttons-events). – skynet Nov 18 '11 at 15:57
  • Thanks Craigy. We have the home key button solved by launching our app when the home key is pressed (configured after install). I believe there is a way using the keyDown or intent filter to handle the recent apps display as well. – David Silva Smith Nov 18 '11 at 16:01
  • Wow, that would piss me off so much. – Dave Newton Nov 18 '11 at 16:03
  • 1
    This is for a business delivering a device with enabling users to do one purpose. Think of a device used to display photos, a computer in the classroom, a kiosk device, NOT someone downloading it from the appstore. – David Silva Smith Nov 18 '11 at 16:09
  • I would still classify that as unhelpful - what if you end up needing to put multiple apps on the same device? – Clockwork-Muse Nov 18 '11 at 16:38
  • 1
    I think this is a useful question. Think of running a Tablet in a store which presents some products. You do not want the customer to do anything else with the tablet than viewwing this app. We are searching for an answer to that question ourselves. Of course such apps should not be freely available in the Android Market. – js- Nov 18 '11 at 16:42
  • I don't know why you assume such apps would not be on the Market if they were possible without modifying android itself... after all people abuse the back button functionality quite often – skynet Nov 18 '11 at 17:47
  • possible duplicate of [Home button disable](http://stackoverflow.com/questions/6507063/home-button-disable) – David Silva Smith Nov 18 '11 at 18:42

1 Answers1

0

These two questions achieved what I needed:

Home button disable

I had to do this as well Disable Lock Screen

Community
  • 1
  • 1
David Silva Smith
  • 11,498
  • 11
  • 67
  • 91