News

New Feature: HTTP JSON Templates Posted on 03 Mar 13:39 , 0 comments

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:


Ionic 2 and Cordova Background Geolocation Posted on 09 Feb 15:51 , 0 comments

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:


Infinite Geofencing Posted on 04 Jan 15:27 , 0 comments

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.


New BackgroundGeolocation feature: #watchPosition Posted on 22 Sep 17:40 , 0 comments

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


Background Geolocation Scheduler Posted on 22 Apr 00:18 , 0 comments

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 #forceReload to auto-start the foreground activity (where your Javascript lives).


Now on npm Posted on 09 Apr 21:22 , 0 comments

cordova-background-geolocation can now be installed from npm:


Today's field-testing Posted on 10 Mar 21:23 , 0 comments

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 "prevent suspend" mode. Posted on 14 Feb 16:14 , 0 comments

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).

preventSuspend: true

When you configure the Background Geolocation plugin with preventSuspend: true, the plugin will prevent iOS from suspending your app (without using any hacks) and constantly monitor the accelerometer, allowing the Javascript in your app to run indefinitely. Since your app is constantly running in the background, the plugin is much more responsive with detecting "stationary" exit, typically requiring just a few meters of movement.

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.


New Geofence Feature Posted on 20 May 00:51 , 0 comments

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:

The Javascript API looks like this: 

In my sample app, I add a geofence like this: