Android Question Sanity check regarding geofences

Sandman

Expert
Licensed User
Longtime User
I've read all I could find in the forum and on Googles developer pages, and I just want to verify something with the forum to make sure I've understood correctly.

This is how I have understood it:

If I use the built-in system in Android, where the OS reports geofence activity to my app, the only shape I can use for my geofence is a circle consisting of a coordinate and a radius. So nothing like rectangle, oval, polygon or anything else.

Have I understood this correctly?

(Please note that this thread is only about the built-in solution available in the OS, so it's not relevant to enable the GPS and code a solution to handle different shapes.)
 

emexes

Expert
Licensed User
Have I understood this correctly?
Not answering your question, but related:

Presumably the OS geofencing is aiming to be as efficient as possible, and that would include logic like: (i) the fastest this phone ever moves is 30 m/s, and we are 1.2 km from the geofence therefore we can wait 40 seconds before we need to check the GPS, and (ii) if the accelerometers don't indicate any phone movement, then we don't need to fire up the GPS at all.

With motion-processing becoming a co-processor thing, perhaps the minimum background service common in all implementations is the circular (ie basic distance) geofence, and so that is what the OS offers.

You can piggyback your own exotic shape geofence on to it using the same logic, to take advantage of whatever power efficiency measures the OS is taking.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top