Send text queries to google assistant Flutter

1.7k views Asked by At

I'm building an app with flutter where I need to open google assistant with interpreter mode with a click of a button

I couldn't find any way to do so.

Is it possible to send a text query to google assistant containing " OK GOOGLE, Be my interpreter " which is the query that opens the desired mode of google assistant, if it is possible, how is it done ?

I also found some answers using google assistant sdk but all of them were in python so does that mean google sdk can't be used in flutter ? if it can be used how is that done ?

What about google assistant api what is it exactly for? can something like that be done using it ?

2

There are 2 answers

1
Oreofe Solarin On

Well. Yes, you can. I did some googling I saw this nice tutorial writing by Marcin SzaƂek.

This is the link. You would have to capture the intent, then handle it in the MainActivity.

0
Param Mittal On

You can use this plugin called - external_app_launcher . Use the package name as - com.google.android.apps.googleassistant

and it will open the google assistant app inside your app. After that, you can speak your query.

enter image description here