• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Disable home button

Baweg

Lurker
Sep 7, 2011
3
0
Hi,
i need to lock the home button in my app, because it's used in a scientific test and i don't want the test to be interrupted by accidental pressing the home button.

The only way I found was to set my Activity as Keyguard or Keyguard_Dialog.
But with this option on, my Views aren't shown in the right order.
I have a CameraView, an OpenGLView and an OverlayView for displaying Text above the other two Views.
But with the Keyguard-Option on, the OverlayView always lies under the two other Views, no matter in which order I add them to the ViewGroup.

Does somebody know why this happens in Keyguard-Mode or does someone know another way to disable the home button?

Tomorrow I can post some code if needed.

Regards,
Baweg
 
Hi,
I solved my problem on my own.
I found out that you can disable the buttons (like home button) for the whole system on a rooted device.

FYI:
Mount system partition as read/write:
karuppuswamy.com/wordpress/2009/04/25/mounting-system-partition-in-read-write-mode-in-android/

Edit Files in /system/usr/keylayout/:
droidforums.net/forum/droid-hacks/23552-disable-search-button.html
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones