GOOGLE ASSISTANT READ NEWS COMMAND
Moderator: Martin
GOOGLE ASSISTANT READ NEWS COMMAND
I'd like to send "read news" command to google assistant in the morning.. can someone help me?
Re: GOOGLE ASSISTANT READ NEWS COMMAND
You will need to enable accessibility services for Automagic, and you can only use this with screen on, as we are going to use Control UI. So if you want to trigger this flow from screen off, you have to add another set of action to turn on and unlock the screen first (which will require device admin or even root in some devices).
Use trigger Time, time in the morning
Add action : Launch App, to launch google assistant
Package name : com.google.android.googlequicksearchbox
Class Name : com.google.android.apps.gsa.staticplugins.opa.hq.OpaHqActivity
Add another action : Control UI, to send the command. You can look at control UI tutorial here : viewtopic.php?f=6&t=7320
But I just paste the script below that you can use directly
The text that sent is "read news", which you can change to something else. If you need to exit from the assistant after each command, you can add additional script
Which will press back twice to exit from the app and back to the previous app.
or
Which will press home and immediately go back to home screen.
Use trigger Time, time in the morning
Add action : Launch App, to launch google assistant
Package name : com.google.android.googlequicksearchbox
Class Name : com.google.android.apps.gsa.staticplugins.opa.hq.OpaHqActivity
Add another action : Control UI, to send the command. You can look at control UI tutorial here : viewtopic.php?f=6&t=7320
But I just paste the script below that you can use directly
Code: Select all
sleep(1000); //increase this if your Google Assistant takes time to load up.
clickById("com.google.android.googlequicksearchbox:id/opa_hq_content_footer_icon_keyboard");
sleep(500);
setText2ById("com.google.android.googlequicksearchbox:id/input_text", "read news");
sleep(100);
clickById("com.google.android.googlequicksearchbox:id/send_button");
Code: Select all
sleep(2000);
back();
sleep(200);
back();
or
Code: Select all
sleep(2000);
home();
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.