getCurrentLocation gets timeout on Android API17
See original GitHub issueMy 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:
- Created 7 years ago
- Comments:24 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.
@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.profAnyways, I’ll create new project with this new version and let you know if I get any errors.