Location trigger versus Periodic Location Update trigger

Post your questions and help other users.

Moderator: Martin

Post Reply
windowns
Posts: 6
Joined: 10 Apr 2013 00:56

Location trigger versus Periodic Location Update trigger

Post by windowns » 10 Apr 2013 21:09

Hey everyone,

I'm making a flow that will toggle certain settings on my phone while i'm at work. So I've setup two flows both use Location triggers. One obviously for when I "enter" the location, and the other for when I "leave" the location.

I was wondering would it be better (in terms of lower power consumption) if I opted to use the Periodic Location Update trigger instead?

Thanks,

Chris

passmethecheese
Posts: 10
Joined: 05 Apr 2013 01:44

Re: Location trigger versus Periodic Location Update trigger

Post by passmethecheese » 16 Apr 2013 01:41

I also want to know this.

User avatar
Martin
Posts: 4345
Joined: 09 Nov 2012 14:23

Re: Location trigger versus Periodic Location Update trigger

Post by Martin » 17 Apr 2013 10:04

It's quite difficult to give a good answer since it is not documented what the underlying function used by the trigger location exactly does on each device and Android version. It might use clever Google algorithms now or in future versions of Android.
The currently available version of Android will generally use GPS and/or network when enabled on the device and it will query the location about every 4 minutes when the device is not used. The location is determined using network (WiFi access points and phone cells) when GPS is disabled or when GPS is not able to get a location fix.

The trigger Periodic Location Update is quite simple. It will query the location using the specified provider (network/WiFi/cells or GPS) and will reject locations with a bad accuracy (when enabled). This is useful to reject large cells when you know that the locations of interest also have wifi access points and a more precise location becomes available eventually.

All network location providers will use services of Google to convert the location information (access points or cells) into a coordinate with latitude/longitude.

Some battery saving strategies you can try:
-keep using the regular location trigger and disable GPS in the settings of your phone
-use a periodic location update with an update interval of about 4 minutes (network provider) and see if you have good results in your area
-increase/decrease the update interval as much as you like. It might be good enough to check the location every 30 minutes for some usecases.
-switch to a cell based approach that does not require the network at all (trigger/condition Phone Cell GSM)
-determine your location based on other information (for example triggers WiFI connected/disconnected instead of a location trigger)

You could also use the trigger Periodic Location Update to build a more battery friendly strategy by using multiple flows. This could be useful when you travel between two cities etc.:
Flow1 "City checker"
-Trigger "Periodic Location Update: every 1h (Network)"
-Condition "Location: in city xyz"
-->true: action "Set Flow State: enable Flow2"
-->false: action "Set Flow State: disable Flow2"

Flow2 "
-Trigger "Periodic Location Update: every 5m (Network)"
-Condition "Location: in office in city xyz"
-->true: action "Speech Output: work!"

Regards,
Martin

Post Reply