Navigation Apps Auto turn on/off GPS

Share and discuss your flows and ideas with other users.

Moderator: Martin

valdimar
Posts: 5
Joined: 03 Dec 2018 08:29

Re: Navigation Apps Auto turn on/off GPS

Post by valdimar » 26 Feb 2019 04:13

For a long time I have been using a similar activity written by me and everything is ok except when during the navigation it will be necessary to temporarily close the navigation window, for example Google Maps when you need to enter something in the search engine, Automagica is activated and the location and access to the Internet are disconnected. How to achieve a delay of 10-20 seconds?

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

Re: Navigation Apps Auto turn on/off GPS

Post by Desmanto » 26 Feb 2019 17:11

I don't quite understand what you want to achieve. If you need delay, add sleep for 10-20 seconds, before proceeding to disconnect the location and internet.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190512, Pie 9.0, Rooted.

elektroinside
Posts: 69
Joined: 14 Feb 2019 15:04

Re: Navigation Apps Auto turn on/off GPS

Post by elektroinside » 26 Feb 2019 23:57

Unfortunately, none of these methods work anymore with Android v9, to toggle location services...
Attachments
IMG_20190227_015603.jpg
IMG_20190227_015603.jpg (129.12 KiB) Viewed 1704 times
IMG_20190227_015618.jpg
IMG_20190227_015618.jpg (101.31 KiB) Viewed 1704 times

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

Re: Navigation Apps Auto turn on/off GPS

Post by Desmanto » 27 Feb 2019 18:17

Yes, the non root method seems not working anymore. I have to use Set GPS State on/off to achieve the location mode with high accuracy. Other method is to toggle the quick setting using Control UI, which have some UI distraction.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190512, Pie 9.0, Rooted.

pgrilo
Posts: 1
Joined: 28 Feb 2019 08:53

Re: Navigation Apps Auto turn on/off GPS

Post by pgrilo » 28 Feb 2019 17:18

Hi. Fortunately I think it is still possible to toggle location on and off without root on pie.
I was testing the premium version (trial) and after playing around a bit and realizing that it wouldn't work on samsung pie not rooted (while it does work on other automation app that I'm migrating from) I decided to read the contextual help. :) Followed the dev's indications and it worked perfectly!
Purchased premium version instantly!

So, to turn location on, instead of setting "location_providers_allowed" to "gps,network" in one step, do it in two steps: set it to "+gps" first and then to "+network". To turn it off set it to "-gps" and then "-network".
Please check if it works this way on your devices.
Attachments
Screenshot_20190228-164102.jpg
Screenshot_20190228-164102.jpg (175.98 KiB) Viewed 1660 times

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

Re: Navigation Apps Auto turn on/off GPS

Post by Desmanto » 28 Feb 2019 18:03

@pgrilo : Wow, I didn't know that. :o Many thanks. It works, without root. I should take some time to reread the documentation again. :lol: Maybe there are a lot of other system setting also have the same behaviour. I should try them out then.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190512, Pie 9.0, Rooted.

elektroinside
Posts: 69
Joined: 14 Feb 2019 15:04

Re: Navigation Apps Auto turn on/off GPS

Post by elektroinside » 28 Feb 2019 19:35

Awesome! Thank you, works just fine here as well!

tphg
Posts: 57
Joined: 17 Apr 2017 05:31

Re: Navigation Apps Auto turn on/off GPS

Post by tphg » 01 Mar 2019 07:10

Wow, a new discovery! Thanks, @pgrilo.
Does it mean now we have to add 2 actions in series: the first is for turning on GPS and another is for turning on network?

anuraag
Posts: 226
Joined: 24 Jan 2015 02:06

Re: Navigation Apps Auto turn on/off GPS

Post by anuraag » 01 Mar 2019 08:20

@Desmanto you might have forgot it as it was already discussed in page 2 :D http://automagic4android.com/forum/view ... =10#p18708

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

Re: Navigation Apps Auto turn on/off GPS

Post by Desmanto » 01 Mar 2019 17:29

@tphg : yes, two action in series, if you have location completely off before. I always turn on location with battery saving, so network value is there already. I only use -gps and +gps, only single action.

@anuraag: Hahaha, I already forgot that. :lol: Last time I test it at old phone, set the value at once, it still works. That's why I don't give it much thought. Didn't know that was the culprit after upgrade my phone.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190512, Pie 9.0, Rooted.

Post Reply