Page 1 of 1

Geofencing with Location Services

Posted: 16 Mar 2017 10:19
by thewild
Hi !

From reading the help files, I understand that location check is executed by Automagic in it's own code.
Wouldn't be a good idea to add the possibility to use the Location Services' Geofencing API ?
I think this API is very power efficient, and nicely integrated with sleep/doze.
It has all the needed events (entering, exiting, dwelling), and IMHO as customizable as Automagic's own location trigger.

Re: Geofencing with Location Services

Posted: 16 Mar 2017 19:00
by Martin
Hi,

The trigger Location uses the Geofencing feature provided by the device (method Classic). Automagic does not use any polling on it's own, the help page just mentions the polling interval since this was usually the way it was/is implemented by devices.
You can also use the Google Play services geofencing by switching the method to Modern.

Regards,
Martin

Re: Geofencing with Location Services

Posted: 16 Mar 2017 19:20
by thewild
Martin wrote:Hi,

The trigger Location uses the Geofencing feature provided by the device (method Classic). Automagic does not use any polling on it's own, the help page just mentions the polling interval since this was usually the way it was/is implemented by devices.
You can also use the Google Play services geofencing by switching the method to Modern.

Regards,
Martin
OK, thanks a lot for the information Martin !

Re: Geofencing with Location Services

Posted: 17 Mar 2017 15:25
by thewild
All right, I change my flow to "Location", and I think it works really great !
For my information, is there a reason why "periodic location update" can be time-range limited, and not location ?
I added to "time" flow to enable and disable my location flows based on time (it works, no problem), but it makes the flow list a bit messy.

Re: Geofencing with Location Services

Posted: 20 Mar 2017 21:05
by Martin
I've added time constraints directly to the periodic location trigger since Automagic has to register the time events in the system to execute the flow anyway so most of the logic was already part of this trigger.
Triggers that don't use the alarm/time features of Android don't have the time range limitation since you can either add a condition Time Range to the flow or enable/disable the flow.

Regards,
Martin

Re: Geofencing with Location Services

Posted: 20 Mar 2017 21:53
by thewild
Martin wrote:I've added time constraints directly to the periodic location trigger since Automagic has to register the time events in the system to execute the flow anyway so most of the logic was already part of this trigger.
OK I get it, thanks for the information.
Triggers that don't use the alarm/time features of Android don't have the time range limitation since you can either add a condition Time Range to the flow or enable/disable the flow.
The time range might work for most flows, but for location the point is to to save power. With a time range condition the location would still be queried regularly, so disabling is the best option.

Well it works fine, so no problem. I think it's a good idea to keep triggers simple and straightforward.

Thanks a lot
Regards