当前位置: 动力学知识库 > 问答 > 编程问答 >

How to prevent android application interface from exiting

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: