Navigation Apps Auto turn on/off GPS

Share and discuss your flows and ideas with other users.

Moderator: Martin

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Navigation Apps Auto turn on/off GPS

Post by yxd0018 » 28 Jan 2019 18:13

Thanks, i looked at your flow at page 1. As I asked in the index page, how can I group various apps in the app start trigger so that I can reuse that list in the app stop trigger? I hate redefining static config multiple times. Suppose manual copying can work in a script, and I'm wondering if there is a better way.

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

Re: Navigation Apps Auto turn on/off GPS

Post by Desmanto » 28 Jan 2019 18:35

yxd0018 wrote:Is there a way to
1. Capture app names in a list var that shares among different flows for trigger app task start/end.
2. How to differentiate app running at background and app killed? Example is for flow auto turn GPS off when GPS app exits, but I use map while checking SMS as well.
I just answer here.

1. Unfortunately, there is no way to do so. Since most field that has the package names as the input, only support wild card * and ?, but doesn't support variable. (even though it is comma delimited). Maybe this should be requested as feature : Variable support in package name field in various trigger (App Task Started, Ended, UI Event, etc). I even make my own method, to export the flow, edit it to the new packagename list and reimport the flow, replacing the old one. It is possibel to extend my flow to select multiple flows and replace all of them at once. But I think variable support is the best solution.

2. You can check the recent app by using execute root command ps -A : viewtopic.php?f=5&t=7557&p=22707&hilit= ... ing#p22707, but it is not neat. As it is condition checking, not trigger. And the maps can stay background for a long time before got killed (and not visible from ps -A). I simply use delay sleep and turn the GPS off if the maps is not open during those sleep delay; as shown in this navigation app flow.
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.

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Navigation Apps Auto turn on/off GPS

Post by yxd0018 » 28 Jan 2019 18:37

Thanks a lot. You are tremendous help in this forum. Appreciate very much.
Since I migrated from tasker to automagic, I like it more and more.

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Navigation Apps Auto turn on/off GPS

Post by yxd0018 » 28 Jan 2019 19:26

Just want to confirm the behavior on android 9 (pie) (i'm using lineageos 16):
1. set gps state off actually won't disable gps until net network location state=false
2. since it's not getting {ssid} until getting gps/location, and I'm using ssid to change sound profile. That means I have to turn on GPS all the time, which basically defeat the purpose to have navigation flow.

EDIT: I found condition "location provider enabled" but couldn't find action to set its value.

Thanks.

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

Re: Navigation Apps Auto turn on/off GPS

Post by Desmanto » 29 Jan 2019 15:49

1. Location feature is controlled separately. GPS for high accuracy and network location for battery saving. Set GPS only turn on/off the high accuracy. Set network location State off will turn off the location feature completely if the GPS is also off
2. At my RR Pie (based on LOS 16 too), I don't need to turn on GPS. Only the network location need to be on (which I have enabled all the time).

The action you want to find in this case is "Set Network location State"
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.

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Navigation Apps Auto turn on/off GPS

Post by yxd0018 » 29 Jan 2019 17:23

Thanks for the explanation. Now ssid won't depend on wifi.
When I only set GPS off with network location on, the GPS icon at setting status is still shown as on. Do you see the same behavior on los 16?
There is no network location setting from UI in los16, right?

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

Re: Navigation Apps Auto turn on/off GPS

Post by Desmanto » 29 Jan 2019 17:31

At mine, the GPS icon only appear when the GPS is on and there is an app using it. So even GPS is on, if no app are using it, the icon is not shown. While when network location is on, there is never any icon to indicate it is on, which should be the default behaviour in android. It is the expected behaviour, as in RR 6.2.0 Oreo 8.1 also show the same. Your LOS build probably have bug in the network location icon.

Yes, RR 7.0.0 also don't have any setting to set the network location. I thought it is because the ROM is in testing build. Turns out, your LOS 16 also don't have that setting. We are fortunate that Automagic can change it for us.
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.

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Navigation Apps Auto turn on/off GPS

Post by yxd0018 » 29 Jan 2019 19:04

very possible. my los16 with latest kernel is not stable at all. But I'm stuck here as my los15 backup is bad.
Another question, which action to set display reading mode (I guess that's new feature for android 9 )? Searching all the help section and doesn't find word "reading".
You are the best.

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

Re: Navigation Apps Auto turn on/off GPS

Post by Desmanto » 30 Jan 2019 17:26

AFAIR, Reading mode is already there since Nougat 7.0. But not all vendors implement it. Reading mode or blue light filter or some call it night mode is basically filter out the blue color to reduce eye fatigue for prolonged screen viewing. There is no action to set the reading mode. There is Set night mode, which will turn the whole device theme to night mode. The result depends on the phone. At mine, the quick setting background which is white, will become dark mode. Several setting also become dark mode.

However, in the RR pie build I am using, all setting related to color display, calibration, including this reading mode are broken. Nothing will change the display color or reading mode. Test at your ROM, whether it is working or not. I heard that latest AOSP Pie ROM broke this feature.

There is secure setting database correspond to the reading mode. You can use action Set System Setting to change the value. But it is not working (not reflected by system) in Oreo 8.1 (both in MIUI and RR 6.2.0). In current RR 7.0.0, I can't find the value anymore, since the reading mode is broken, nothing changed when I toggle the button.

With currently broken reading mode, I can actually reuse my old widget, set it to show full screen overlay covering the whole resolution; change the color to a bit yellow-brown and transparent. But currently not so urgent, so I don't use it.
BTW, since the discussion is not related to navigation apps anymore, I think it is better to open new thread for it.
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.

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Navigation Apps Auto turn on/off GPS

Post by yxd0018 » 30 Jan 2019 18:07

Thanks for explanation. I've tried all other system settings already. I don't have further questions.

Post Reply