简体   繁体   English

如何在Android 4.4中为信息亭模式锁定android主页按钮,最近的应用程序按钮和后退按钮?

[英]How to lock android home button,recent app button and back button for kiosk mode in android 4.4?

I am trying to lock android default button by using System alert window.its works fine up to android version 4.3 but doesn't works on android 4.4. 我试图通过使用系统警报window.android锁定默认按钮,它可以正常工作到android 4.3,但不能在android 4.4上。 Please help me 请帮我

I ran into similar problem before. 我之前也遇到过类似的问题。 Using system alert dialogs to avoid user going to home or out of the application was a good idea. 使用系统警报对话框来避免用户回家或离开应用程序是一个好主意。 I assume that you are trying to do the same. 我认为您正在尝试这样做。

What I did was, run a background thread that will open up the activity (bring the activity to the front) of your application (if the application is not in front). 我所做的是,运行一个后台线程,该线程将打开应用程序的活动(将活动置于最前面)(如果应用程序不在最前面)。

Depending upon the need to enable or disable this functionality, you can pause the background thread and start when appropriate, which will save the battery :). 根据启用或禁用此功能的需要,您可以暂停后台线程并在适当的时候启动,这样可以节省电池:)。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM