Android Question Sanity check regarding geofences

Discussion in 'Android Questions' started by Sandman, Aug 8, 2019.

  1. Sandman

    Sandman Well-Known Member Licensed 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.)
  2. emexes

    emexes Well-Known Member Licensed User

    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.
  3. DonManfred

    DonManfred Expert Licensed User

    Based on the google-docs; yes.
    emexes likes this.
  4. Sandman

    Sandman Well-Known Member Licensed User

    Thank you.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice