I want to perform an action within my android app from google assistant.
For example. I have an android app with one button, and on click of the button i get a toast saying "hello world".
I want to perform this toast action from google assistant. That is:
When my phone is idle, i will say "Hello google, display toast from my toast app" And the toast will be displayed. And after displaying the toast i will get a reply from assistant saying " toast displayed successfully".
How can i achive this ?
In general, what you are looking for is called an app action.
However, app actions are only defined for specific types of apps and Intents, and only particular trigger phrases. You can't define your own phrases at this time.