I am working on a project to integrate the
Google Assistant with an existing Android app. The requirements are simple. Assuming my app is named
TestApp and I want it to just change the background color of the app home page, I want to be able to say,
“Hey Google, Change background to black on TestApp“.
I was given links to ActionsSDK, but looking into it, I see that it is only a stand-alone app that extends
Google Assistant and has nothing to do with android itself.
The closest API I found that does what I need is the Voice Interactions. This is very similar to what I need done but it only allows preset voice triggers such as “call this person…” or “set alarm at…“, but cannot do “change background…” like in in my example. According to this link, custom voice actions aren’t allowed.
So my question is, is it possible to directly interact with my app and have it do a very simple task?
You may want to connect an Android app property with your Actions project to sell your digital goods in the Play store. Implement digital transactions to sell your Play store items as part of a conversation with your Action.
To connect an Android app with your Actions console project, you will first need to connect a website to your project. Follow the instructions provided above in Connecting a website.
Once you’ve connected a website, under Android app, click the Connect App button and follow the instructions shown. Once you have completed the instructions over in the Play console, it may take up to 24hrs before the connected Android app is reflected in the Actions console.
Try this in Action on google
Right now there is no way to do communication between Android App and Google Assistant. If your GA is built upon Dialogflow API (specifically not using action-on-google), then you can use Dialogflow Android client in your Android App to communicate with Dialogflow Agent.
I wrote an app for my own use to brighten the screen when I was in bright sunshine and could not see the screen by asking the assistant to launch the app. Then on launch I executed code to make the change. A cheesy work-around I know 🙂
you can try using this
This will allow you to perform several actions through voice inside your app. You can use the console to add actions and utterances and there are some sample apps which might help you.
I have used it in a lot of my apps.
Feel free to reach out in case you need help, good luck!