Fully-featured, Ionic-based sample-application for Cordova Background Geolocation (Premium Version)
Edit settings and observe the behavour of Background Geolocation changing in real time.
Step 1. Start by cloning this repo
$ git clone https://github.com/transistorsoft/cordova-background-geolocation-SampleApp.git
Step 2. Now we must install the application's required plugins. Copy/paste the following one-liner (Cordova 5-style) into your console to install all the required plugins.
$ cordova plugin add cordova-plugin-device cordova-plugin-console cordova-plugin-whitelist cordova-plugin-splashscreen
Step 3. Now install the cordova-background-geolocation
plugin. Install one of the following:
A. Premium Version (requires paid license)
$ cordova plugin add https://github.com/transistorsoft/cordova-background-geolocation.git
$ cordova plugin add https://github.com/transistorsoft/cordova-background-geolocation-lt.git
Step 4. Add your desired platform(s) and build.
$ cordova platform add ios
$ cordova build ios
$ cordova platform add android
$ cordova build android
$ cordova run android
Step 5. Boot the iOS Simulator
The quickest way to see the plugin in-action is to boot the iOS simulator and simulate location
The plugin has a debug
mode for field-testing. The plugin will emit sounds during its life-cycle events:
Event | iOS | Android |
---|---|---|
Exit stationary-region | Calendar event sound | n/a |
Location recorded | SMS-sent sound | "blip" |
Aggressive geolocation engaged | SIRI listening sound | "doodly-doo" |
Acquiring stationary location | "tick, tick, tick" | n/a |
Stationary state | "bloom" | long "beeeeeeep" |
Geofence crossing | trumpets/fanfare | boop-boop-boop |
NOTE: In order for debug sounds to operate when the app is in background, you must enable the Audio and Airplay
Background Mode.
A simple Node-based web-application with SQLite database is available for field-testing and performance analysis. If you're familiar with Node, you can have this server up-and-running in about one minute.
The app implements a longtap event on the map. Simply tap & hold the map to initiate adding a geofence.
Enter an identifier
, radius
, notifyOnExit
, notifyOnEntry
.