Page 1 of 2
Google Now Integration with Automagic
Posted: 29 Nov 2015 02:08
by skudo12
Hello,
I am trying to use Google Now to launch certain commands that would be detected after the phrase "OK Google".
I stumbled into the following link:
viewtopic.php?f=5&t=3547
I tried to use the UI Event as the trigger and it works fine when there is no internet access in the device. However, if there is an internet access, it doesn't detect the text in the google app search box.
Is there a way to integrate Google Now with Automagic without the use of plugins when internet access is available?
Note that I am using a Z3 Compact with Android Lollipop 5.1.1
Re: Google Now Integration with Automagic
Posted: 01 Dec 2015 15:25
by Martin
Hi,
Excerpt from a recent email:
It seems that Google changed some internals so the old procedure does not work anymore. Unfortunately it's not possible to intercept such events in a reliable way.
You could try to combine trigger UI Event with action Control UI to extract the spoken text. Something like this could work (depending on Google search version):
-trigger UI Event: Window opened package com.google.android.googlequicksearchbox
-action Control UI: text = getText(545, 293);
You could add another action that acts based on the extracted text in variable text. The x/y coordinates 545/293 are probably different on your device. You can find the correct coordinates with the overlay
control of action Control UI or by turning on 'Pointer location' in the developer settings of your device.
Regards,
Martin
Re: Google Now Integration with Automagic
Posted: 25 Sep 2016 09:14
by snosious
The "UI Event: Window opened package com.google.android.googlequicksearchbox" does not work for me to detect the hotword "OK Google". What do I have to do? I just want to detect that the Google Assist is active to rise volume. Thanks!
Re: Google Now Integration with Automagic
Posted: 25 Sep 2016 17:14
by Martin
The current version of the "OK Google" app/feature does not send any events that are currently supported by Automagic. The required events are not enabled since it could have a negative impact on the overall device performance. I'll test if this is still the case and will activate the other event type when everything looks good.
In the past one of the Auto-plugins provided Google Now integration that could work in this case. Maybe it was AutoVoice but I'm not sure.
Regards,
Martin
Re: Google Now Integration with Automagic
Posted: 25 Sep 2016 19:46
by snosious
I have to apologize, maybe this was not the right thread to ask my question. I just want Automagic to detect that the Google Now Assist is actual listening. Like it's doing after you said "OK Google". Automagic should than change the media volume. Automagic does not need to do things based on speech. Thank you very much.
Re: Google Now Integration with Automagic
Posted: 26 Sep 2016 17:58
by Martin
Yes, unfortunately that's exactly the part that does not work. The current version of Google Now on my phone does not send any usable events when saying "OK Google". The search result often sends some events, but not when Google Now just starts listening.
Re: Google Now Integration with Automagic
Posted: 03 Oct 2016 08:37
by snosious
Ok, thank you very much for your allways very good support and explanations. How can I find out witch intents are send by search results?
Re: Google Now Integration with Automagic
Posted: 03 Oct 2016 16:43
by Martin
You could either try trigger
UI Event to detect the search results as described in an earlier post:
-trigger
UI Event: Window opened package com.google.android.googlequicksearchbox
-action
Control UI: text = getText(545, 293); The coordinates likely need to be adjusted for your device.
The following post might also be interesting:
http://automagic4android.com/forum/view ... 607#p15607
Alternatively there exists an Auto-plugin that allowed to intercept Google Now search results:
Google Play: AutoVoice
Please note that Google Now does not offer an official API to integrate with so most methods could stop working when Google updates Google Now or it might also fail on some devices for various reasons.
Regards,
Martin
Re: Google Now Integration with Automagic
Posted: 25 Jan 2017 16:24
by Bascule
This is the easiest way I have found of doing this:
Use the paid version of the Tasker Now plug-in (only 88p). The free version doesn't do regular expressions.
Create a trigger with a Plugin Event, select Tasker Now, and set the Statement to matched to ^.*
Then add an action of Set Audio Volume, set Sound Type to "Music", set Change Type to "Set value" and select the Volume level of choice.
I also tick the "Show Volume Level Popup" box so I get evidence that the flow has run.
Hope this helps someone
Re: Google Now Integration with Automagic
Posted: 10 May 2017 16:45
by mbirth
Is there a way to use the new Assistant API ("Actions on Google"?) to get this feature in a more standard conform way?