Skip to content
nativescript plugin for android that get last known location
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
node_modules first commit Jan 5, 2020
platforms
scripts
.npmignore
README.md first commit .1 Jan 5, 2020
index.d.ts first commit Jan 5, 2020
index.js
package-lock.json
package.json first commit .1 Jan 5, 2020
references.d.ts
tsconfig.json

README.md

nativescript-last_known_location

import { Last_known_location } from "nativescript-last_known_location";
import { isAndroid, isIOS, device, screen } from "tns-core-modules/platform";

function getlastlocation(){
    if( !isAndroid ) return ;
    const get_last_location_class=Last_known_location;
    var get_last_location = new get_last_location_class();
  //optional  get_last_location.msg="message when request location permission"
    get_last_location.getlocation(
        location=>{
          console.log("least known location latutide:longitude"+location.getLatitude()+","+location.getLongitude());
        },
        ()=>{ console.log("no permission");}
    )
}

(Optional) Prerequisites / Requirements

npm and nativescript install

Installation

tns plugin add nativescript-last_known_location

Usage

API

License

Apache License Version 2.0, January 2004

You can’t perform that action at this time.