3

how do I disable the menu, home, back and search key programmatically in android, including the vibrate when those keys are pressed.

user1174960
  • 83
  • 3
  • 9
  • http://stackoverflow.com/questions/2162182/android-is-it-possible-to-disable-the-click-of-home-button - look at this post, it is just the same, and there are some useful approaces – OleGG Jan 28 '12 at 08:51

1 Answers1

2

You can't disable the home button. The back button you'll need to override onBackPressed(), and the menu button shouldn't do anything unless you assign it an action.

If you mean disable these system-wide, I'm afraid glad you can't do that.

Glitch
  • 2,785
  • 1
  • 27
  • 50
  • I'm thinking, like how the Video application of android disables those 4 keys by just pressing the power button. You can still watch the video but when you touch any part of the screen, even those 4 keys, it will just show you a lock icon on the upper right corner. So I guess it's possible since the video application can do it. – user1174960 Jan 28 '12 at 08:48
  • Well, I have a Samsung Captivate Glide and it came with a player named "Videos". – user1174960 Jan 28 '12 at 17:31
  • Maybe it's using an undocumented private API made by Samsung. – Glitch Jan 29 '12 at 10:09