如何检测/识别设备锁定屏幕设置是否设置为“无”? [英] How to detect/identify if device Lock Screen setting is set to None?

查看:123
本文介绍了如何检测/识别设备锁定屏幕设置是否设置为“无”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在启用我的应用程序之前检查设备是否在设置上没有定义安全性。

I need to check before enabling my application if the device has no security defined on setting.

无法设置:模式,PIN,密码甚至滑动

Can't have set: Pattern, PIN, Password and even Swipe.

有人知道一种检查锁定屏幕设置是否未启用的方法吗?

Does anyone know a way to check if the lock screen setting is not enabled?

或者,可以我们检查上面的哪个锁定屏幕设置已启用?

Alternately, can we check which of the above lock screen settings is enabled?

谢谢!

推荐答案

您可以使用KeyguardManager-它的isSecureMethod()在您的情况下应返回false。 http://developer.android.com/reference/android/app/KeyguardManager.html

You can use KeyguardManager - it's isSecureMethod() should return false in Your case. http://developer.android.com/reference/android/app/KeyguardManager.html

这篇关于如何检测/识别设备锁定屏幕设置是否设置为“无”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆