Use the Google Assistant to talk directly with my Android app and complete a very simple task.

I am working on a project to integrate Google Assistant with an existing Android application. The requirements are simple. Assuming my application is called TestApp and I want it to just change the background color of the applicationโ€™s home page, I want to say:

Msgstr "Hello Google, change the background to black on TestApp."

They gave me links to ActionsSDK , but looking at it, I see that this is only a standalone application that extends Google Assistant and has nothing to do with android itself.

The closest API that I found does what I need is voice interactions . This is very similar to what I need to do, but it allows only predefined voice triggers, such as "call this person ..." or "set the alarm to ...", but cannot "change the background ...", as in my example. This link does not allow user voice actions.

So my question is, is it possible to interact directly with my application, and it performs a very simple task?

thanks

+22
source share
4 answers

You might want to associate an Android app property with your Actions project in order to sell your digital products on the Play store. Implement digital transactions to sell items from your Play store as part of a conversation with your action.

To connect the Android application to the Actions console project, you must first connect the website to your project. Follow the instructions in the Connecting a Website section above.

After connecting the website in the Android application, click the "Connect Application" button and follow the instructions. After following the instructions in the Play console, it may take up to 24 hours before the connected Android application appears in the Actions console. Try it in action on Google

+1
source

There is currently no way to establish a connection between the Android application and the Google Assistant. If your GA is based on the Dialogflow API (especially without using action-on-google), then you can use the Dialogflow Android client in the Android application to interact with the Dialogflow agent.

0
source

I wrote an application for my own use to brighten the screen when I was in bright sunlight and could not see the screen, asking my assistant to launch the application. Then at startup, I executed the code to make the changes. Cheesy workaround I know :-)

0
source

You can try using this

[1]: https://docs.slanglabs.in/slang/

This will allow you to perform several actions using voice within your application. You can use the console to add actions and sayings, and there are a few sample applications that can help you.

I have used it in many of my applications. Feel free to contact in case you need help, good luck!

0
source

Source: https://habr.com/ru/post/1273637/


All Articles