Code Monkey home page Code Monkey logo

cordova-plugin-background-geolocation-example's Introduction

Example Background Geolocation app.

MainUI Settings

Description

Example app shows some possibilities of cordova-background-geolocation plugin.

Compatibility

Name Version
Cordova CLI 7.1.0
Cordova-Android 6.3.0

How to build

Build app

npm install
npm run build

App will be built into www folder.

Replace platform with one of supported platforms: android, ios. In this example we will build for Android.

cordova platform add android
cordova plugin add cordova-plugin-mauron85-background-geolocation
cordova build android

There is after_platform_add hook in config.xml which runs script that install all required plugins.

Run on device

iOS

You will need to install ios-deploy package.

npm -g install ios-deploy
cordova run ios --device

Android

cordova run android --device

Run in simulator

iOS

You will need to install ios-sim package first

npm -g install ios-sim

Run in default emulator

cordova emulate ios

You can use cordova run ios --list to see all available targets and cordova run ios --target=target_name to run application on a specific device or emulator (for example, cordova run ios --target="iPhone-6").

Android

To deploy the app on a default Android emulator.

cordova emulate android

You can use cordova run android --list to see all available targets and cordova run android --target=target_name to run application on a specific device or emulator (for example, cordova run android --target="Nexus4_emulator").

App Development

Cordova Example App is sharing code with react-native variant. Native libraries are aliased to use their web variants. That is possible thanks to amazing webpack, native-base-web, react-native-web projects.

For development install and use webpack-dev-server:

webpack-dev-server --content-base src/

Plugin development

All plugins will be installed from npm at their latest version. However if you want to install your local version on cordova-plugin-background-geolocation, you can do that:

cordova plugin rm cordova-plugin-mauron85-background-geolocation
cordova plugin add file:///absolute_path_to_your/cordova-plugin-background-geolocation/
cordova build

Credits

  • transistorsoft for background-geolocation-console, cordova-background-geolocation and SampleApp.

iOS quirks

If you're using XCode, boot the SampleApp in the iOS Simulator and enable Debug->Location->City Drive.

cordova-plugin-background-geolocation-example's People

Contributors

mauron85 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.