🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

cordova-plugin-locationbgservice

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-locationbgservice

Location tracker background service

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

Cordova location background service

Plugin for get the current user location information and then send to server or a particular API based on fixed time interval which will define in config at the time of service call.

Supported Platforms

  • Android

Installation

The plugin can be installed via [Cordova-CLI][CLI] and is publicly available on [NPM][npm].

Execute from the projects root folder:

$ cordova plugin add cordova-plugin-locationbgservice

Or install a specific version:

$ cordova plugin add cordova-plugin-locationbgservice@VERSION

Start

Start the location tracking service

let options = {
	clientId: "", // Can be a userId/clientId/uniqueId for identity.
	url: '', // API url which is recevied the location.
	interval: 5000 // Fixed time interval
}
window.LocationBGService.start(function (reponse) {
	console.log(reponse);
}, function (error) {
	console.log(error);
}, options);

Stop

Stop the service

window.LocationBGService.stop();

Enabled

Check the status of the service

window.LocationBGService.isRunning(function(response){
    console.log(response);
});

API can receive the object like an example

{
	"clientId": "1234",
	"provider": "network",
	"bearing": "0.0",
	"latitude": "28.6613927",
	"accuracy": "22.209999084472656",
	"speed": "0.0",
	"longitude": "77.3849333"
}

Report issues to mail <mailto:admin@dkrock.com>

Keywords

android

FAQs

Package last updated on 18 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts