Select Page

Monitor Large Numbers of Geofences

2 minute read

ScaleUp! Community, previously we wrote about geolocation, geofences, how to acquire locations for your app, defining the process of geocoding, performing geocoding and, most recently, about the metafence. This article will focus on how to monitor large numbers of geofences using mobile devices.

Android

As per Android API documentation, Android apps can monitor events for a maximum of 100 geofences.

iOS

As per iOS API documentation, iOS apps can monitor events for a maximum of 20 geofences.

The lowest common denominator between Android and iOS is 20 geofences, which is a small number. Even 100 geofences is not many depending on the use case in your app. This will force you to reload geofences as your users move around. 

The Solution

One solution to the problem of monitoring large numbers of geofences is to, instead of creating geofences on the mobile device, monitor them on the server. For example, you could use significant location change events to trigger service calls from your app. The service call can run a query against an infinite number of geofences to determine if any geofences have been entered or exited. 

Rather than using significant location change events, which are supported by iOS only, you could create a proximity geofence, with a radius of 500 meters for example, around each of your users. Your app can monitor this proximity geofence for exit and use this as a trigger to call to your servers for geofence entry / exit determination. As the user moves around, if they exit the proximity geofence, a new one will be created with the users’ new location as its center. 

Twitter

LinkedIn