Page 1 of 1

Set GPS state not working

Posted: 13 May 2017 22:18
by krishnivas
Hi.
I have a rooted Nexus 7 2013 tablet. The set GPS state action is unable to switch GPS off if it was previously enabled directly in either quick settings or settings/location. It works fine if it's set to on state using Automagic.

Unable to figure out why. Any thoughts on this is much appreciated.

Thank you all in advance!

Best regards
Krishna

Re: Set GPS state not working

Posted: 14 May 2017 18:57
by Martin
Hi,

I did not encounter this issue yet on any of my test devices. A rooted Pixel also works. Are you using a custom ROM or is this the stock Google ROM?
Is there anything in the log of Automagic?

Regards,
Martin

Re: Set GPS state not working

Posted: 14 May 2017 20:18
by krishnivas
Hi Martin.

Firstly, congrats on becoming a dad. All the best henceforth.

To answer your question, the rom is stock. Also, this happens with my rooted MotoG3 stock rom as well. I enabled location using quick settings and then executed action set GPS state off using Automatic. Please find below the logs.

14.05.2017 22:12:42.303 [Disable location] Start executing action 'Set GPS State: Off'
14.05.2017 22:12:42.304 [Disable location] Action 'Set GPS State: Off' enable = false
14.05.2017 22:12:42.355 [Disable location] End executing action 'Set GPS State: Off'
14.05.2017 22:12:42.390 [Disable location] Flow continues executing with the next step.
14.05.2017 22:12:42.390 [Disable location] Start executing condition 'Location Provider Enabled: GPS'
14.05.2017 22:12:42.392 [Disable location] End executing condition 'Location Provider Enabled: GPS' with return value false

I have a condition as the next step in the flow to check and it's returning false even when location is enabled.

Unable to understand why.

Best regards
Krishna

Re: Set GPS state not working

Posted: 16 May 2017 11:37
by Martin
Hi,

Thanks! :D

It sounds like GPS might actually be turned off which is confirmed by the condition. Maybe your device was in mode 'High accuracy' and turning off GPS switched location mode to 'Battery saving' which would cause the quick settings tile to stay turned on. You could turn off the network location using action Set Network Location State to ensure that location is turned off entirely.

The location modes of Android: are a combination of GPS and network:
High accuracy: GPS on, Network location on
Battery saving: GPS off, Network location on
Device only: GPS on, Network location off

Regards,
Martin