nativescript-community / gps

Tracks GPS location updates regardless of the app state. Does not depend on Google Play Services.
https://nativescript-community.github.io/gps/
Other
10 stars 2 forks source link

Android getLastKnownLocation throws error #8

Closed sivo1981 closed 3 years ago

sivo1981 commented 3 years ago

√ Getting NativeScript components versions information... √ Component nativescript has 7.1.2 version and is up to date. √ Component @nativescript/core has 7.1.4 version and is up to date.
√ Component @nativescript/ios has ^7.1.1 version and is up to date.
√ Component @nativescript/android has 7.0.1 version and is up to date.

"@nativescript-community/gps": "^2.1.5"

When calling getLastKnownLocation error Cannot read property 'getTime' of null is thrown. Variable tempLocation is null.

https://github.com/nativescript-community/gps/blob/44d3384d02b50c5bde623b8b208c94242f2eb3d5/src/gps.android.ts#L447

farfromrefug commented 3 years ago

@sivo1981 fixed in 2.1.7. Thanks for the detailed report!

sivo1981 commented 3 years ago

@farfromrefug works great. Thanks for a quick fix.