Hello Guys
I am in the process of writing a simple GPS logger app, where the user will have the ability to start and stop recording location tracking.
Below is the implementation for start and stop recording. I am using the plugin cordova-plugin-geolocation and accessing Geolocation from ionic-native . The problem is Geolocation.watchPosition is never using GPS to get location and always rely on either WIFI or the mobile network even though enableHighAccuracy is set to true. This is resulting in inaccurate data. I have tested this in android latest device by publishing my app to google app store.
options = { maximumAge: 3000, timeout: 30000, enableHighAccuracy: true };
watch = Geolocation.watchPosition(options);
startRecording() {
this.watchSubscription = this.watch.subscribe((position) => {
this.buffer.push({ lat: position.coords.latitude, lng: position.coords.longitude });
});
}
stopRecording() {
this.watchSubscription.unsubscribe();
}
Please can someone help me what I am missing like any configurations in code, config.xml or play store settings etc.
Thanks
Vijay