Page 1 of 1

Req variable location_state from Location Provider Enabled

Posted: 01 Oct 2015 04:28
by natong
Since AM didn't have supplied variables in Location Provider & Mobile Datanetwork. I had difficult to check the state.
Screenshot_2015-10-01-12-12-49-082.jpeg
Screenshot_2015-10-01-12-12-49-082.jpeg (199.3 KiB) Viewed 10632 times


I would like to request supplied variables location_state from Location Provider Enabled (trigger & condition).

location_state

The location state (0=unknown, 1=passive, 2=network, 3=GPS, 4=All, 5=disabled)
Screenshot_2015-10-01-10-58-06-259.jpg
Screenshot_2015-10-01-10-58-06-259.jpg (219.37 KiB) Viewed 10639 times

Re: Req variable data_state from Location Provider Enabled

Posted: 01 Oct 2015 04:31
by natong
Also request supplied variables data_state from Mobile Datanetwork Enabled (trigger & condition).

data_state

The data state (0=unknown, 1=enabled, 2=disabled)
Screenshot_2015-10-01-11-12-03-692.jpg
Screenshot_2015-10-01-11-12-03-692.jpg (263.99 KiB) Viewed 10638 times

Re: Req variable location_state from Location Provider Enabl

Posted: 01 Oct 2015 12:10
by Martin
I add it to the todo-list.

In the mean time you can use action Init Variable System Setting for both cases, however it's not really official so it might not work on some ROMs:

Location case:
Category: Secure
Name: location_providers_allowed
value will be a comma separated list like gps or network,gps or an empty string when location is turned off

Mobile data case:
Category: Global
Name: mobile_data
value will be 0 for disabled and 1 for enabled

Regards,
Martin

Re: Req variable location_state from Location Provider Enabl

Posted: 02 Oct 2015 04:00
by natong
Thank you very much. Your suggestion work great in my phone. Make my flow easiest.
Screenshot_2015-10-02-10-47-30-746.jpeg
Screenshot_2015-10-02-10-47-30-746.jpeg (273.6 KiB) Viewed 10615 times