question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getCurrentLocation gets timeout on Android API17

See original GitHub issue

My app works fine on Android API 22 and higher. Got my hands on phone with API 17. Made a fresh tns create test --ng project, with "nativescript-geolocation": "^0.0.17" version. Every request that gets sent, gets timed out.

    ngAfterViewInit() {
        console.log("View initialized...");
        geolocation.getCurrentLocation({
            desiredAccuracy: 3, 
            updateDistance: 1, 
            maximumAge: 20000, 
            timeout: 20000
        }).then(function(loc) {
            console.log("LOC:");
            console.log(JSON.stringify(loc, null, 4));
        }).catch(function(response){
            console.log("E: ", response);
        });
   }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
DimitarTachevcommented, Oct 11, 2017

We closed the issues as the Android implementation is fully replaced by a new one and we are not able to reproduce the timeouts anymore.

You could take a look at the 4.0.0 release notes here.

1reaction
ivanblazeviccommented, Oct 11, 2017

@DimitarTachev problem was with emulator, I updated Google Play Services using latest 3.0 emulators but after the update I was getting:

10-11 12:26:53.568 2190 2233 W zygote : Couldn't lock the profile file /data/user/0/com.google.android.googlequicksearchbox/files/velour/verified_jars/JS1bTx6n5gskKdcs8I56Wzg_2.jar.prof: Failed to open file '/data/user/0/com.google.android.googlequicksearchbox/files/velour/verified_jars/JS1bTx6n5gskKdcs8I56Wzg_2.jar.prof': No such file or directory 10-11 12:26:53.568 2190 2233 W zygote : Could not forcefully load profile /data/user/0/com.google.android.googlequicksearchbox/files/velour/verified_jars/JS1bTx6n5gskKdcs8I56Wzg_2.jar.prof

Anyways, I’ll create new project with this new version and let you know if I get any errors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to timeout when calling requestLocationUpdates when ...
Android Studio 3.4. I am using the FusedLocationProviderClient to get the coordinates for latitude and lontitude.
Read more >
navigator.geolocation.watchPosition runs only once on Android
I'm using phonegap 3.2, with Android API 17, on Android 4.1 Devices. wathPosition only works once! The GPS symbol disappears right after it...
Read more >
How to minimise the time delays on location fetch - HCL support
getCurrentPosition API in Android, the following issues are observed. ... timeout [Number] - denotes the maximum length of time in milliseconds that is ......
Read more >
Index - Robolectric
deviceConnected(BluetoothDevice) method or timeout occurred. ... Stubbing this out as if Android S+ is on the classpath, we'll get a ClassCastException ...
Read more >
Diff - platform/frameworks/base - Google Git
diff --git a/Android.mk b/Android.mk index 54ca200..3473e18 100644 ... the Activity so we can get the FragmentManager - Context context = mContext; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found