简体   繁体   English

检测何时发生失败的解锁

[英]Detect when a failed unlock happens

I've been looking around for a while to find out what happens when a user fails to unlock the phone. 我已经寻找了一段时间,以了解当用户无法解锁手机时会发生什么。

Basically I'm trying to take a picture if a user fails to authenticate. 基本上,我试图在用户认证失败时拍照。 But all I can find is ACTION_USER_PRESENT - Does anyone know if this is possible? 但我只能找到ACTION_USER_PRESENT有人知道这是否可能吗?

Thanks 谢谢

You can't access the login attempts of the android lockscreen. 您无法访问android锁定屏幕的登录尝试。

If you want to build an app that does that you have to create your own lockscreen. 如果您想要构建一个可以执行此操作的应用程序,则必须创建自己的锁屏。 However, this is not a "real" lockscreen you can't edit in the android settings. 但是,这不是您无法在android设置中进行编辑的“真实”锁屏。 This would be an App which acts like a lockscreen and has the same permissions. 这将是一个功能类似于锁屏并具有相同权限的应用程序。 Because you can check if a phone is locked, that way the app would activate its own "lockscreen" (which is basically a normal form with many permissions) whenever the phone gets locked (you probably have to deactivate the original lockscreen). 因为您可以检查手机是否被锁定,所以只要手机被锁定(您可能必须停用原始的锁定屏幕),应用程序就会激活自己的“锁定屏幕”(基本上是具有许多权限的正常形式)。

Look into this link, there you have all options regarding the original lockscreen. 查看链接,您可以找到有关原始锁屏的所有选项。

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

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