Is there a way to control my app by "Hey MyApp!"?

71 views Asked by At

I can not find any information anywhere on the net, not even in Google Documentation about controlling our self developed android app by voice without having to tap a GUI element previously.

We successfully implemented voice control into our app, but for the app to start listening, I have to tap a microphone icon on the GUI.

I want our app listening all the time and if I say a specific command like "Hey MyApp!" (Like Hey Google) then the app knows that it needs to listen for my command.

Is it possible?

I found this: https://developer.android.com/training/wearables/user-input/voice

And this: https://developer.android.com/guide/app-actions/overview

And this: https://support.google.com/accessibility/android/answer/6151848?hl=en

But none of them explaining things in a way that I understand if it's possible or not. English is my third language and I am not a programmer, but a designer.

Our programmers are also not experienced in this field.

Thanks for answers in advance.

1

There are 1 answers

2
CommonsWare On

Is it possible?

That depends.

If you are building your own custom hardware with its own custom build of Android on it, then yes.

If not, and you literally want what you are asking ("I want our app listening all the time and if I say a specific command like "Hey MyApp!" (Like Hey Google) then the app knows that it needs to listen for my command"), then no. You cannot even have your app running all the time, let alone with the microphone active. You also would need to have your plans reviewed by qualified legal counsel, as continuously monitoring everything said on the microphone will have ramifications.

If you are planning on distributing your app via the Play Store, and you are willing to be more flexible in your requirements, you could integrate with Google Assistant, per one of the documents that you linked to. Google Assistant can then launch your app if/when needed based on an app action triggered by user speech.