Java – Screen unlock voice commands for Android

Screen unlock voice commands for Android… here is a solution to the problem.

Screen unlock voice commands for Android

I want to screen unlock my android phone with voice commands.

I tried the speech recognition sample code for android, but how to integrate it to achieve this feature?

I have some doubts

1) Do I have to use the service for this feature?

2) Can I still surf the Internet after the phone is locked? (Because Google Voice is using the internet).

3) I looked at the PowerManager class, but when I press the power button, which method can I use to invoke my voiceReconigtion activity? (The phone is in sleep state, lock mode).

Any guide or solution/feedback are greatly appreciated!



I’m almost certain you have to run it in the service, as it seems to be destroyed as soon as it loses focus and the GC needs to be allocated….

As for waking up from sleep, I believe this is the right direction.

Good luck.

Related Problems and Solutions