Page 1 of 1

How to launch Google assistant

Posted: 15 Nov 2017 22:49
by holymoz
Hi, I know that google assistant can be launched by long pressing home, but I need to launch it within a flow.
I use trigger launch app "googlequicksearchbox" but cant find a class that launches the assistant ready to listen, I found only the classic voice search.
Can I launch assistant
At my will? Thanks

Re: How to launch Google assistant

Posted: 16 Nov 2017 05:18
by Desmanto
You can look at viewtopic.php?f=4&t=7050
Just search "opahq" and select the one I stated there. There are indrect ways to feed the query as well.

Re: How to launch Google assistant

Posted: 16 Nov 2017 07:13
by holymoz
Desmanto wrote:You can look at viewtopic.php?f=4&t=7050
Just search "opahq" and select the one I stated there. There are indrect ways to feed the query as well.
thanks but not work, I used the class ..OpaHqActivity but when I execute it appear for a fraction of time a white screen that closed itself without do nothing

Re: How to launch Google assistant

Posted: 16 Nov 2017 10:12
by Desmanto
What version of Google app do you use? I just tested it with current 7.14.21.21.arm64. My phone still LP 5.1 so it won't open the Gass, but it just open the possible command. On my friend's NG 7.0, it will ask for the Gass setup, which I don't turn on. But at least it shows the correct activity.

Make sure you are using Action Launch app, not Start Activity. Or you can try the activity in quickshortcutmaker first (playstore).

Re: How to launch Google assistant

Posted: 16 Nov 2017 10:46
by colabi
Try one of this actions:

Execute Root command > Command
am start -n "com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.OpaActivity"

or:
Execute Root command > Command
input keyevent 219

or:
Start Activity > Action
android.intent.action.VOICE_COMMAND

Nexus 5X, Oreo, rooted

Re: How to launch Google assistant

Posted: 16 Nov 2017 11:12
by holymoz
thanks to all, actually worked with colabi method (1st or 3rd is good).

I need this because I connect to internet only if I need it, normally I'm disconnected so to use assistant I had to enable connection first, so created a flow that with shortcut first enables connection and then starts assistant, thanks

Re: How to launch Google assistant

Posted: 17 Nov 2017 10:08
by Desmanto
If intent voice command work, just use that. For the first one, you can
try the same Launch app, but use the class name from colabi's post.