I would like to turn on DATA when Android Auto starts. Android Auto starts by itself when the USB cable is plugged into the car USB port. I normally keep data off, but would like to have it turn on by itself when I plug in the phone in the car.
I can write the script to toggle data on without any problem. I just cannot figure out how to know when Android Auto is running.
Any ideas?
Determine if a specific app is running?
Moderator: Martin
Re: Determine if a specific app is running?
I've never tried the app for myself before but shouldn't the App Task Started trigger be enough?
Hope my post was helpful
Device: OnePlus 5T running crDroid, rooted with Magisk
Device: OnePlus 5T running crDroid, rooted with Magisk
Re: Determine if a specific app is running?
It would seem that that should work. Sadly it does not.
Re: Determine if a specific app is running?
App Task Started using classic method, require accessibility services to be running. Try to check if the Automagic Accessibility is enabled already. If yes, try to toggle it off and on again. Sometimes the OS kill the service, but Automagic report it is still enabled (happens when you use "nuke button" kill all from the recents menu). Try the Usage statistic method too, make sure Automagic has been granted Usage Statistic.
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.
Re: Determine if a specific app is running?
Trying to follow your instructions, Desmanto. What and where are Usage statistics?
Re: Determine if a specific app is running?
@Econdoc, usage statistics is an alternative method the App Task Running trigger uses to determine which apps have been used last. You can enable it from Settings > Apps & notifications > Special app access > Usage access > Automagic Premium.
Hope my post was helpful
Device: OnePlus 5T running crDroid, rooted with Magisk
Device: OnePlus 5T running crDroid, rooted with Magisk
Re: Determine if a specific app is running?
Usage access seemed to to the trick.
Thanks as always.
Thanks as always.