我在程序中使用 startLockTask()
但发现它只能用于 Android L。但是我希望我的应用程序在低于 5 的版本中运行。
有什么方法可以获得类似的功能吗?
最佳答案
功能上,没有。固定屏幕的目的是防止用户离开您的应用程序。用户无法查看或点击通知,也无法使用主页按钮离开。
视觉上,你can set the app to full screen, , 和/或 hide notification bar .您也可以hide the soft keys on devices that don't have hardware buttons .但是,人们总是可以将其恢复。
编辑:您也可以 disable the back button.
关于android - 如何对低于 L 的 Android 版本使用 startLockTask() 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28140790/