Skip to content

A script that uses Google Play Services to get the most accurate device location on Android devices.

Notifications You must be signed in to change notification settings

daviddexter/nativescript-google-fused-location

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

nativescript-google-fused-location

A script that uses Google Play Services to get the most accurate device location on Android devices in a NativeScript app.

Read the full story here https://medium.com/@daviddextermwangi/nativescript-fused-location-5a8c24a26a86#.nwv590kg9

HOW TO USE

` import { Component } from "@angular/core"; import { LocationService } from "./locate.service";

@Component({ selector: "ns-app", templateUrl: "app.component.html", }) export class AppComponent { constructor(){

   let locationService = new LocationService();
   
   locationService.on("lastLocation",(eventData)=>{
       console.log(eventData.eventName + " has been raised! by: " + eventData.object);  
   })

   locationService.on("nolastLocation",(eventData)=>{
       console.log(eventData.eventName + " has been raised! by: " + eventData.object);
   })
   
   locationService.on("watcher",(eventData)=>{
       console.log(eventData.eventName + " has been raised! by: " + eventData.object);
   })

} } `

About

A script that uses Google Play Services to get the most accurate device location on Android devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published