Hello,
In another thread I saw the following:
Trigger UI Event
A Google Now voice search was executed. The search term can be accessed in the flow in variable text.
Event Type: Text selection changed
Package Name: com.google.android.googlequicksearchbox
Text: leave empty
Should this work? I can't seem to get it to work at all. Thanks!
Problema with UI Events
Moderator: Martin
Re: Problema with UI Events
The topic, you found it from hasn't been updated in a few years. Maybe there's something changed. What have you tried so far?
I would try myself, but my old brick phone doesn't have Google Now feature.
I would try myself, but my old brick phone doesn't have Google Now feature.
Re: Problema with UI Events
I tried the above, trigger ui event. Seems to have no results at all. I'm on a Nexus 6P.
Re: Problema with UI Events
Hi,
Google probably changed the implementation of Google Now so the old method does not work anymore. You could try to use a trigger Activity Started to detect when the search is executed and then grab the text from the search field.
Something like this could work:
-trigger Activity Started package: com.google.android.googlequicksearchbox, class: com.google.android.apps.gsa.legacyui.VelvetActivity
-action Control UI with script sleep(2000);text=getText(545, 293);
Timing and coordinates are probably different on your device. The plugin AutoVoice supported Google Now in the past, maybe they found a way to reliably detect the spoken text on newer versions of Google Now.
Regards,
Martin
Google probably changed the implementation of Google Now so the old method does not work anymore. You could try to use a trigger Activity Started to detect when the search is executed and then grab the text from the search field.
Something like this could work:
-trigger Activity Started package: com.google.android.googlequicksearchbox, class: com.google.android.apps.gsa.legacyui.VelvetActivity
-action Control UI with script sleep(2000);text=getText(545, 293);
Timing and coordinates are probably different on your device. The plugin AutoVoice supported Google Now in the past, maybe they found a way to reliably detect the spoken text on newer versions of Google Now.
Regards,
Martin