简体   繁体   English

设备管理权限对话框

[英]Dialog box for Device administration permission Android

I have a screen lock app like if you tap on it, it will turn off the screen. 我有一个屏幕锁定应用程序,例如,如果您点击它,它将关闭屏幕。 But it needs to be device administrator which I do manually for it. 但是它必须是我为此手动执行的设备管理员。 I want it to show a dialog box when you open the app which will take you to the device administrator settings. 我希望它在打开应用程序时显示一个对话框,该对话框将带您进入设备管理员设置。 Like in the image. 就像图片中一样。 I want to a button in dialog which will take me here 我想要对话框中的一个按钮,它将带我到这里

This should solve your issue. 这应该可以解决您的问题。 Check it out and see if it fits. 检查一下,看看是否合适。

How to open device administrators settings in android? 如何在android中打开设备管理员设置?

Generally speaking you need to find if there is an exported activity on your device that let's you call an intent to launch that settings page. 一般来说,您需要查找设备上是否有导出的活动,以便您调用启动该设置页面的意图。

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

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