Skip to content

derekdon/cordova-background-geolocation-SampleApp

 
 

Repository files navigation

Cordova Background Geolocation — Sample Application

Google Play

Fully-featured, Ionic-based sample-application for Cordova Background Geolocation (Premium Version)

Home Settings

Edit settings and observe the behavour of Background Geolocation changing in real time.

Installation

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 com.ionic.keyboard

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

B. Free iOS Version

$ 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

Debug Mode

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.

Simple Testing Server

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.

Adding Geofences

The app implements a longtap event on the map. Simply tap & hold the map to initiate adding a geofence.

Tap-hold to add geofence

Enter an identifier, radius, notifyOnExit, notifyOnEntry.

About

Cordova Background Geolocation Sample Application (Premium Version)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 83.6%
  • CSS 16.1%
  • HTML 0.3%