Both iOS and Android geofencing are slow in most typical use cases. See the data below.
Furthermore if your Android app must run continuously in the background, with long periods between user app opens, Google Play Services geofencing may not wake up your app at all.
Why Won’t Apple and Google Just Fix This?
A simple and obvious question: why don’t Apple and Google just fix themselves? Surely 1000 PhDs at Apple, and another 1000 PhDs at Google, are smarter than Team PathSense?
The reasons Apple and Google have not done this:
- Most apps do not need timely geofence wakeup. The native platform solutions solve for the “least common denominator”.
- Your app needs to reliably wake up from the background, even if the user has not opened the app for days. This is something Apple and Google are actively trying to prevent.
If you are reading this blog post, it’s probably because your app does need timely wakeup, and reliable wakeup from the background
As you can see from the data:
- iOS CLRegion performs quite well on geofence ingress / arrival, but is slow and inaccurate on egress / departure.
- Android (Google Play Services geofencing) is slow and inaccurate on ingress / arrival, and also performs poorly on egress / departure (although not as poorly as iOS).
PathSense Smart Geofencing Solution
Below is a screenshot from the PathSense Android SmartGeofence demo app.
- The gray circle is the geofence radius.
- The blue circles show geofence arrivals.
- The green show geofence departures.
All of the events were captured in a vehicle, which parks (at our PathSense office) in a parking spot inside the geofence radius.
If this data was captured while walking from the inside to outside of the geofence (departing), the green circles would be very close to the geofence border (because walking speed is far less than driving).
If this data was captured from a Formula 1 race car, the green circles would be much further from the geofence border (because geofence accuracy, and even GPS positioning accuracy for that matter, is always a function of speed and time).
All of the arrival and departure events happened within less than 10 seconds, except for the one outlier which happened within about 30 seconds.
Download the app and try it on your own phone. We promise you will be amazed at the performance as compared to Google Play Services geofencing.
Many Ways to Define Geofencing
Some further detail: The term “geofencing” is used in many different contexts, with many different meanings.
- In the geospatial world, “geofencing” means circles or polygons on maps.
- In the advertising world, “geofencing” means place data (Starbucks, Jack in the Box, 24 Hour Fitness, etc)
The native geofence implementations work as follows: The app developer sets a geofence around one or more known locations (latitude/longitude pairs). iOS supports 50m minimum radiuses, Android supports 100m. When the user / device enters the geofence radius (arrival or “ingress”), or when the user / device exits the geofence radius (departure or “egress”), the geofence wakes up the host app, and optionally provides a GPS location and a “dwell” time (difference between arrival and departure time). That’s it. Native geofencing does not know if a given latitude/longitude pair is inside a Starbucks vs in the middle of a pond.
PathSense Geofencing does exactly the same thing – except it does it faster, and more accurately, at the cost of a small amount of battery – “small” meaning that the developer or user could not notice the difference unless they took the phone apart and soldered battery meter leads to the circuit board (which we in fact do at PathSense).
Several companies offer end-to-end solutions for tasks such as measuring visits to specific venues (Starbucks, 24 Hour Fitness, Walmart, …). These companies have huge databases of polygons, hosted server systems, Web-based control panels, etc. They also have an SDK, but it’s not the same kind of SDK. Some of these even list PathSense (by name) as a competitor. But PathSense is not a competitor to any of these. In fact, some such companies are already PathSense customers.
Learn more about PathSense Smart Geofencing