简体   繁体   English

用于屏幕解锁android的语音命令

[英]Voice command for screen unlock android

I want to use voice command to screen unlock an android phone. 我想使用语音命令来解锁Android手机。

I have tried the voice recognition sample code from android, but how do i integrate it to achieve this feature? 我已经尝试过android的语音识别示例代码,但是如何将其集成以实现此功能呢?

I have some doubts, 我有些疑惑,

1) would i have to use service for this feature? 1)我是否必须使用此功能的服务?

2) when the phone screen is locked, can it have access to internet? 2)当手机屏幕被锁定时,是否可以访问互联网? (because google voice is using internet) (因为谷歌语音正在使用互联网)

3) I have looked through PowerManager class, but using which method can i invoke my voiceReconigtion activity when i pressed the Power button? 3)我查看了PowerManager类,但是当我按下电源按钮时,我可以使用哪种方法调用我的voiceReconigtion活动? (phone is in sleep,locked mode) (手机处于睡眠状态,锁定模式)

Any guide or solution/feedback is much appreciated! 任何指南或解决方案/反馈非常感谢!

Thank You 谢谢

I am almost positive you'll have to run this in a service, as it seems that it would be destroyed as soon as it's out of focus and the GC needs allocations... 我几乎肯定你必须在服务中运行它,因为它似乎会在它失焦并且GC需要分配时立即被销毁...

As far as the waking from sleep, I believe this is the right direction. 至于从睡眠中醒来,我相信是正确的方向。

Best of luck. 祝你好运。

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

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