简体   繁体   English

是否可以禁止关闭Android应用程序?

[英]Is it possible to disallow the closing of an android app?

For an app I'm creating, I need a lock screen. 对于我正在创建的应用,我需要一个锁定屏幕。 For security purposes, the user shouldn't be able to access the app tray or the home button while in this lock screen. 出于安全考虑,用户在此锁定屏幕中应该无法访问应用程序托盘或主页按钮。

Is this possible? 这可能吗? How can it be done? 如何做呢?

This is only possible using the new task pinning API in Lollipop. 这只能使用Lollipop中的新任务固定API And if your app is not the device owner, the user will be asked for permission every time you try to engage the lock. 如果您的应用不是设备所有者,则每次尝试使用该锁时都会要求用户获得许可。 On a non-rooted device, the device owner can only be set up during the initial provisioning after a factory reset. 在非root设备上,设备所有者只能在出厂重置后的初始配置期间进行设置。

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

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