Android的监听器错误锁定模式 [英] Android Listener for Wrong Lock-pattern

查看:170
本文介绍了Android的监听器错误锁定模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一种方法,每个用户插入一个错误的锁定模式上的Andr​​oid设备的时候收到一条消息。 老实说,我并没有关于如何实现这一线索,但我猜我应该有一些类型的服务上注册为一个监听器的背景。但在该广播机构应注册我的听众?

I'm trying to find a way to receive a message every time the user inserts a wrong lock pattern on it's android device. Honestly, I don't have a clue on how to achieve this but I'm guessing I should have some kind of service on the background registered as a listener. But on which broadcaster should I register my listener ?

我很抱歉没有合适的术语,也许我的文字并没有做出太大的意义......但基本上我需要建立一个执行动作的每一次错误的锁定模式插入小类

I'm sorry for not having the appropriate terminology and probably my text doesn't make to much sense... but basically I need to build a small class that executes an action every-time a wrong lock-pattern is inserted.

我不要求为全面code,我只需要一个小例子,TKS。

I'm not asking for the full code, I just need a small example, tks.

更新: 看来,我需要的是不可能的时候,所以,我需要找到一种方法,每次屏幕上收到一条消息?我怎样才能做到这一点?

UPDATE: It seems that what I need is impossible at the time, so, I need to find a way to receive a message every time the screen is on ? how can I achieve this ?

推荐答案

显然,这是不支持的Andr​​oid(如果CommonsWare说 <强>不被支持 ......那么很可能你的运气了)。对不起!

Apparently this is not supported by Android (if CommonsWare says it isn't supported... then chances are you're out of luck). Sorry!

另外,您也可以实现自己的锁屏应用程序,可以记录的信息是这样的你。显然,这是不理想,但它可能是一些思考。

Alternatively, you could implement your own screen lock application that can log information like this for you. Obviously this isn't ideal, but it might be something to think about.

编辑:

为什么你不能这样做的原因是因为屏幕锁定应用程序在它自己的沙盒环境中运行。 沙箱是一套细粒度控制,限制访问的文件,preferences,网络资源等,因此,您所需要的信息是不可访问。

The reason why you can't do this is because the screen lock app runs in it's own sandbox environment. A "sandbox" is a set of fine-grained controls that limits access to files, preferences, network resources, etc. For this reason, the information you require is inaccessible.

这篇关于Android的监听器错误锁定模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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