Hi,
i’m trying to use geolocation on android.
Using Ionic Diagnostic makes me see that I have all the permissions regarding Locations.
But everytime on emulator or on android device, i get an empty array for positions.
I use ‘@ionic-native/geolocation’ and no result.
Then I tried to use HTML5 navigator.getCurrentPosition and nothing happens as if i never came into the code.
navigator.geolocation.getCurrentPosition(this.success, this.error, {
enableHighAccuracy: true,
timeout: 0,
maximumAge: 0
});
success(pos) {
//Use data show alert
};
error(error) {
//Use data show alert
};
I’m trying to contribute. Is this a CORS problem ?
Ionic Info
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.18.0
ionic (Ionic CLI) : 3.18.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.2
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v9.1.0
npm : 5.5.1
OS : macOS High Sierra
Xcode : Xcode 9.1 Build version 9B55
Environment Variables:
ANDROID_HOME : /Users/alencastry/Library/Android/sdk
Misc:
backend : pro