Hi,
I am using ionic native plugin cordova-plugin-geolocation in my app for retrieving device’s current location. Below is my approach after installing plugin-
import { Geolocation } from ‘@ionic-native/geolocation’;
constructor(private geolocation: Geolocation) {}
this.geolocation.getCurrentPosition().then((resp) => {
// resp.coords.latitude
// resp.coords.longitude
}).catch((error) => {
console.log(‘Error getting location’, error);
});
I am able to retrieve co-ordinates on iOS and browser. But it is not working on android device which is returning “object PositionError”. It used to work earlier on android device also. Suddenly I am getting this error. Could some one please help me in getting this resolved?
Thanks,
svvrls