防止用户关闭或最小化android应用 [英] Prevent users from closing or minimizing an android app
本文介绍了防止用户关闭或最小化android应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个android应用,客户端可以让两台平板电脑进行实验.
I have an android app where the client will be let two tablets for experiments.
问题是:可以防止用户最小化或关闭该应用程序吗?我该怎么办?
The question is: Is possible to prevent users from minimizing or closing the app? How can I do that?
推荐答案
信息亭模式正是您所需要的!它是在Android 4.2中引入的.
Kiosk mode is what you are looking for! It was introduced in Android 4.2.
要启用信息亭模式,请在您的 activity_main.xml
中进行设置:
To enable kiosk mode, set this in your activity_main.xml
:
<intent-filter>
<category android:name="android.intent.category.HOME" />
</intent-filter>
该问题很可能是由于以下原因造成的:开发在以下位置运行的应用程序android中的信息亭模式
This question is most likely a dupe of: Develop app run in kiosk mode in android
这篇关于防止用户关闭或最小化android应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文