简体   繁体   中英

Voice command for screen unlock android

I want to use voice command to screen unlock an android phone.

I have tried the voice recognition sample code from android, but how do i integrate it to achieve this feature?

I have some doubts,

1) would i have to use service for this feature?

2) when the phone screen is locked, can it have access to internet? (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? (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...

As far as the waking from sleep, I believe this is the right direction.

Best of luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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