问题描述:

I'm developing an android application using AppGyver on a HP E2P18AA (Android 4.2).

I want to prevent the user from exiting the application(because the tablet will be in a public place), either by :

  • Disabling the buttons and the naigation bar.
  • Hiding the navigation bar permanently.

Or any other idea.

Thank you in advance.

网友答案:

While you can override the device's back button, you probably cannot override device's home or application list buttons without rooting the Android OS.

Place the device inside a cover which prevents user from clicking those buttons. :D

网友答案:

you can hide the Navigation Bar permanently using either build.prop file:

qemu.hw.mainkeys = 1 // write that line at the end of the file

OR

adb command prompt:

 adb shell >
 su >
 pm disable com.android.systemui >

and for more information about how to achieve that or how to edit build.prop file , refer to my answer here.

相关阅读:
Top