Android + Geolocation + CORS problem

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


    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


    backend : pro

pretty sure you need to use

to access the phone internal gps

It just doesn’t work on an android device.

you sure!

it has Geolocation built in

I’m absolutely sure, and i’m not the only one with this probleme.
You tell me to use this one instead to access to the geolocation ?

Don’t have android yet doing IOS, but, want to port so, Im just throwing out ideas,

what about Native HTTP, that may act like a browser?

hey, have you tried.

angular google maps, its a small package that runs so you can dev in browser and works on phone