4

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

star
  • 71
  • 1
  • 1
  • 6

1 Answers1

0

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.

Community
  • 1
  • 1
While-E
  • 1,527
  • 2
  • 20
  • 37
  • Hi thanks for reply! if i run this in service, when the phone is in sleep mode, will the service still be running in the background? can the phone access to internet while it is still in screen locked mode? – star Sep 24 '11 at 03:55