How to launch Google assistant

Post your questions and help other users.

Moderator: Martin

Post Reply
holymoz
Posts: 113
Joined: 13 Sep 2013 10:27

How to launch Google assistant

Post by holymoz » 15 Nov 2017 22:49

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

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: How to launch Google assistant

Post by Desmanto » 16 Nov 2017 05:18

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

holymoz
Posts: 113
Joined: 13 Sep 2013 10:27

Re: How to launch Google assistant

Post by holymoz » 16 Nov 2017 07:13

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

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: How to launch Google assistant

Post by Desmanto » 16 Nov 2017 10:12

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).
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

colabi
Posts: 134
Joined: 06 Jan 2013 22:33

Re: How to launch Google assistant

Post by colabi » 16 Nov 2017 10:46

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

holymoz
Posts: 113
Joined: 13 Sep 2013 10:27

Re: How to launch Google assistant

Post by holymoz » 16 Nov 2017 11:12

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

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: How to launch Google assistant

Post by Desmanto » 17 Nov 2017 10:08

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply