2

Does anyone know how to create a polygonal geofence in Android? I know that Android supports circular (i.e., lat/long + radius) geofences, but I need more precise control over their boundaries.

Dylan Knowles
  • 2,726
  • 1
  • 26
  • 52

1 Answers1

3

For concerns about CPU & power consume, I recommend to use the solution decribed here.

  1. Create a fake circular geo-fence around your Polygon
  2. When a geofence alert is thrown for this circular geofence, evaluate if it is also inside your Polygon using the answer provided by Karl.
Community
  • 1
  • 1
L. G.
  • 9,642
  • 7
  • 56
  • 78
  • 1
    Good idea! As far as I know they do that in video games as well to make collision detection more efficient. I never would've thought to use it in geofences. Thanks! – Dylan Knowles Jul 14 '16 at 02:06