10

I'm starting with the geo fencing API of google play services. I think I understood the general concept but I couldn't find out if there's a limit for geofences. I give my list of geofences to the the location client and he handles the rest. But how many geofences can I pass to the location client? As many as I want?

joschplusa
  • 1,353
  • 1
  • 13
  • 20
  • Please check my answer as the one marked as accepted is wrong. – Marian Paździoch Jun 12 '15 at 09:02
  • The accepted answer is correct. In the link you provided below, it specifically states: "Note: On single-user devices, there is a limit of 100 geofences per app. For multi-user devices, the limit is 100 geofences per app per device user." – forevercrashed May 31 '16 at 16:19

3 Answers3

11

You get 100 geofences per app per device

You can have multiple active geofences, with a limit of 100 per device user. For each geofence, you can ask Location Services to send you entrance and exit events, or you can specify a duration within the geofence area to wait, or dwell, before triggering an event. You can limit the duration of any geofence by specifying an expiration duration in milliseconds. After the geofence expires, Location Services automatically removes it.

https://developer.android.com/training/location/geofencing.html

they tell you in the google IO session called Beyond the Blue Dot: New Features in Android Location

tyczj
  • 71,600
  • 54
  • 194
  • 296
  • 1
    They are not sure "We can double check." https://www.youtube.com/watch?v=URcVZybzMUI#t=2167. So how can you @tyczj be so sure? – Marian Paździoch Nov 27 '14 at 14:00
  • 1
    @MarianPaździoch because I know that is the limit – tyczj Nov 27 '14 at 16:28
  • 1
    you said `100 geofences per app per device` but later the doc states `100 geofences per device user` and not per app – Juan Saravia Apr 12 '18 at 18:59
  • 2
    @Juancho right from the docs `On single-user devices, there is a limit of 100 geofences per app. For multi-user devices, the limit is 100 geofences per app per device user.` – tyczj Apr 12 '18 at 19:03
  • Thanks! please can you update the answer to clarify that? thanks again – Juan Saravia Apr 12 '18 at 19:33
0

Official docs:

You can have multiple active geofences, with a limit of 100 per device user.

Thus if a device has > 1 user then there can be more than 100 geofences on the device.

Marian Paździoch
  • 8,813
  • 10
  • 58
  • 103
  • 1
    Further down the page, it has this snippet: "Note: On single-user devices, there is a limit of 100 geofences per app. For multi-user devices, the limit is 100 geofences per app per device user." – forevercrashed May 31 '16 at 16:17
  • 1
    this is what I answered, isn't it? – Marian Paździoch Jun 01 '16 at 06:20
  • Sorry, but one thing is not clear to me. the limit of 100 geofences per app, is it for each application package name, or for each installed application? Thank you. – Sergio76 Oct 19 '21 at 13:59
0

You can handle more than 100 geofences if you wish too, by taking the approach in this answer:

Adding more than 100 geofences

Community
  • 1
  • 1
Rendy Del Rosario
  • 1,277
  • 10
  • 20