Traditionally, the BackgroundGeolocation plugin has had a hard-coded "Location Data Schema" which you've had to modify your server to consume:
No longer. Now you can finally configure your own templates with the plugin to customize your own HTTP JSON schema:
The following template tags are currently supported:
See the "HTTP Features" docs for your desired platform:
Yes, the cordova-background-geolocation plugin works fine with Ionic 2. I really don't see a great need for a definitions file. The Demo App is now built with Ionic 2.
Here's a simple Ionic 2 implementation:
BackgroundGeolocation now supports infinite geofencing. Why is this important? Because the native platforms limit the number of geofences which can be simultaneously monitored. For iOS the limit is 20 while Android allows 100.
Previously, you had to manually manage which geofences to monitor based upon the current location, perhaps asking the server periodically which geofences were within range.
Now you can load any number of geofences into the plugin (tested with tens-of-thousands). The plugin will periodically perform a geospatial query upon the geofences in the database, activating those closest within a configurable geofenceProximityRadius.
Following is an animation of this feature performed in the iOS simulator, where a series of geofences have been loaded along the entire City Drive route.
With Infinite Geofencing, BackgroundGeolocation is the most advanced geofencing plugin available, more advanced than any dedicated geofencing plugin.
BackgroundGeolocation now has its own native #watchPosition method!
#watchPosition will keep your app running in the background (even on iOS!), so be careful with it.
Tracking Iceland Posted on 29 Jun 09:01 , 0 comments
During June 12-27 2016, I took a vacation in Iceland, circumnavigating the entire island. This was a great opportunity to do a long-term field-test in a remote, mountainous and sparsely populated territory.
I used two phones: iPhone 6s @ 9.3.2 and Android Nexus 5 @ 6.0.1 running Cordova Background Geolocation 1.7.0.
The results were much better than expected, even while travelling up rugged mountain roads and remote gravel-roads.
See the results with browsable map here
Cordova Background Geolocation
React Native Background Geolocation
Native Script Background Geolocation
I've added new Scheduler feature for Background Geolocation. It's working pretty fine with Android & iOS so far.
The Scheduler is able to auto-start itself on boot and have similar
#stopOnTerminate option as well as
Now on npm Posted on 09 Apr 21:22 , 0 comments
cordova-background-geolocation can now be installed from npm:
Here's a field-test I performed with my "Android Family" today, showing the results of various configurations.
I use the plugin's #emailLog method to fetch the log files during the test.
iOS is far more strict when it comes to background operation than Android. For an app which uses our Background Geolocation plugin, as soon as the plugin enters stationary mode, iOS will immediately suspend your app. In stationary-mode, the Background Geolocation plugin has created a geofence around the current position and iOS will not interrogate this geofence until a "significant-change" event occurs. A significant-change event is generated when the device changes cell-towers. This typically takes several urban city blocks of movement but can take a kilometer (or more, it depends on the nature of the network environment).
When you configure the Background Geolocation plugin with
However, great care should be taken to manage preventSuspend mode since it will have a big impact on battery usage, since your app is constantly running in the background. This mode isn't meant to be used by everyone -- it should only be used in special cases (preferably applications where the phone is probably plugged into power) where the user is aware that your app is trading battery-power for tracking-responsiveness.
Today I implemented the ability to add arbitrary Geofences with iOS. I'll implement Android next.
In debug-mode, the sound "Fan Fare" will play when you enter a geofence. "Fan Fare" sounds like this:
In my sample app, I add a geofence like this: