跟踪/计数以模式进行的解锁尝试
我开发了一个小应用程序,可以识别设备何时锁定和解锁 BroadcastReceiver
,加上filter.addAction(Intent.ACTION_SCREEN_OFF)
和filter.addAction(Intent.ACTION_USER_PRESENT)
。
当屏幕锁定和锁定时,此功能运行良好并可以正确记录。解锁,但它没有给我解锁的尝试结果,意味着我想跟踪每次尝试并记录解锁模式是否正确,并在每次尝试解锁设备时记录“解锁成功”或“解锁失败” 。有什么帮助吗?
I have developed a small application which can recognize when device get lock and unlock usingBroadcastReceiver
, plus filter.addAction(Intent.ACTION_SCREEN_OFF)
and filter.addAction(Intent.ACTION_USER_PRESENT)
.
This work well and log properly when screen Lock & Unlock, but it is not giving me the attempt result of unlock, means I want to track each attempt and log that, if unlocking pattern is correct or not and log "Unlock Success" OR "Unlock Fail" at each attempt made to unlock device. Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 android 的设备管理 API 可以实现这一点。
您需要 BIND_DEVICE_ADMIN 权限才能跟踪它。
Use Device Administration APIs of android do achieve this.
You need BIND_DEVICE_ADMIN permission to track that.