Can some Ionic engineer or anyone else explain to me why a basic feature like Geo Location does not work on Android? This left me disappointed with Ionic to the point that I was considering throwing my entire project off a few days ago from the official release.
This is my code:
getLocation() {
return new Promise((resolve, reject) => {
this.geolocation.getCurrentPosition({timeout: 10000, enableHighAccuracy: true}).then((resp) => {
resolve(resp.coords);
}).catch((error) => {
// console.log('Error getting location', error);
resolve(undefined);
});
});
}
What is going on
In Android devices, the getCurrentPosition method returns nothing in the Then or Catch.
What I’ve already tried
I have read a lot of articles here in the forum, in stackoverflow and elsewhere and tried to apply everything that was tip to solve this problem. I already put it inside the “platform.ready ()”. Nothing, absolutely nothing solves that mistake!
I already came back version of Ionic Cli. I have already reinstalled entire node_modules.
This is frustrating and disappointing. Where is the Ionic engineering that does not solve this for the developer community?