Any way to detect if Location Services enabled?

514 views
Skip to first unread message

Steven Rollason

unread,
Jun 26, 2016, 8:03:36 AM6/26/16
to Tasker
I have created a task which allows easy toggling between Battery Saving and High Accuracy Location mode (using AutoInput as the phone is not rooted).
I am calling this from a custom icon in the quick settings (using the Custom Quick Settings app). I am currently setting the state of the icon between disabled and enabled based on the %GPS variable (GPS Status) which is "on" in High Accuracy mode and "off" in Battery Saving mode. However, I would also like to be able to hide this icon if Location is turned off completely. Is there way to detect this within Tasker?


Pent

unread,
Jun 27, 2016, 2:38:54 AM6/27/16
to Tasker
I don't think so, with maybe the exception of a shell command to query system settings (which I don't know,
you might be able to find it in the forum).

Pent

Robert Ryan

unread,
Jun 27, 2016, 12:19:25 PM6/27/16
to Tasker
You can use the AutoInput plug-in. AutioInput's Query UI can be used to retrieve all of the visible and hidden text from the Location Settings screen. One of the hidden text items is whether Location is OFF or ON.

CAUTION: The Custom Quick Settings plug-in for Tasker has a major bug that causes it to manipulate the incorrect tile. A bug report has been filed and hopefully it will be corrected in the next revision.

Steven Rollason

unread,
Jul 5, 2016, 2:53:49 PM7/5/16
to Tasker
I've actually ended up creating a Tasker plugin which fires an event whenever the location mode is changed (including when Location is turned off entirely) and I'm using that to update the state of the icon.

Abdullah Alahdal

unread,
Jul 16, 2016, 2:08:09 PM7/16/16
to Tasker
Needless to say there is a plugin System Settings for Tasker which monitors system Settings.

Pent

unread,
Jul 17, 2016, 2:53:21 AM7/17/16
to Tasker
I'd forgotten about that one, sorry OP.

Pent
Reply all
Reply to author
Forward
0 new messages