0

I am able to have my app listen to the user (voice recognition) if they press a button. I would like to know how I can do the same thing without pressing a button, ie have the app perform a voice recognition task for certain key words.

bob dylan
  • 647
  • 1
  • 10
  • 25
  • Possible duplicate of [Android Speech Recognition as a service on Android 4.1 & 4.2](http://stackoverflow.com/questions/14940657/android-speech-recognition-as-a-service-on-android-4-1-4-2) – brandall Apr 28 '16 at 21:37

1 Answers1

1

Try using a Service, which is designed to run continuously in the background, and integrate listeners into it. Services, in general, are not affected by what what the user is doing with the visible UI.

http://developer.android.com/guide/components/services.html

Clark Wilson
  • 389
  • 2
  • 6