android-location-provider 1.0.1 • Public • Published 6 years ago Android Location Provider for Cordova r1.0.0
Android Location Provider is a cordova plugin allow users to interact with native android location services, through google play services location provider 15.0.1.
It's easy to use:
Using with cordova:
Location . Provider . < featuer > ( args [ ] , callback_handler , error_handler ) ;
callback_handler = function ( args ) {
}
error_handler = function ( ) {
}
Using with ionic:
( < any > window ) . Location . Provider . < featuer > ( args [ ] , callback_handler , error_handler ) ;
function callback_handler ( callback_args ) {
}
function error_handler {
}
Features:
Get the most known location of device
getLastKnownLocation ( onLocationResult , onError ) ;
onLocationResult = function ( location ) {
var latitude = location . latitude ;
var longitude = location . longitude ;
}
onError = function ( ) {
}
Watching for location updates
getLocationUpdate ( updateInterval , fastestUpdateInterval , onLocationUpdate , onError ) ;
onLocationUpdate = function ( location ) {
var latitude = location . latitude ;
var longitude = location . longitude ;
}
onError = function ( ) {
}
Get formated adderss as string
getLocationAddress ( latitude , longitude , onAddressFound , onError ) ;
onAddressFound = function ( address ) {
}
onError = function ( ) {
}
How to install
cordova plugin add android-location-provider
Package Sidebar Install npm i android-location-provider
Downloads Weekly Downloads