Problem with geolocation

Using “my mobile app”
this is the code who works fine on web but seems to be non compatible after migration on android with “my mobile app”
someone can confirm my doubt ?

thanks
code:
wixWindow.getCurrentGeolocation()
.then( (obj) => {

let mylatitude = obj.coords.latitude;             // 32.0971036 
let mylongitude = obj.coords.longitude;           // 34.774391099999995 

….

thanks for help

You don’t say what the problem is. What isn’t working? What’s not compatible? What is it doing and not doing?

i ll try to explain

i use wixWindow.getCurrentGeolocation() in my page to get the user position . it works fine on web access
i use a application “my mobile app” to generate application for android .
and this function return “NaN”.

Seems that it’s not returning number values for some reason. Do a console.log() of the values to see what it’s returning.

We’ll have to figure out somehow if it’s a browser issue, or if geolocation is disabled on your device, or if there is some other issue.

console.log() is ok and return the attended values .
the problem is only on android application in live , (preview version is ok )

It sounds as if the location services aren’t available. Disabled? Permissions? Any other sites you can try that use geolocation from the browser?

Can you grab the returned values and display them on the screen? I suspect that you are getting error codes.

I know geolocations works on an iPhone. I don’t have an Android device.

id there another way i can try to obtain geolocation ? ( api google ?)

No… Because, the geolocation call is a browser function which gets the geolocation of your device. Google API isn’t able to do that.

You can see geolocation and the Google API in action in this example:

Using the Places API from Google Map Services

Demonstrates geolocation queries using the Google Maps Places API web services. The queries are performed in backend (server-side) web modules.

@yisrael-wix I have the same issue. It works on iPhone browser “Safari”, but it is not working on the mobile app.

@cdelmas19 Did you fix this issue?!