Russ Russ - 28 days ago 9
Android Question

Sharing gps location in Chrome for andriod

I've seen this question asked multiple times, so I apologize for asking again. However, the posted solutions are not working.

I'm trying to run web apps that require my position such as this. My laptop browser will ask me permission, and then share my location. My mobile chrome browser just refuses to run the code without saying anything.

I have followed the official google directions. My site settings say that javascript is allowed and location is ask first. All sites respond exactly as if I had blocked location.

Has anyone ran into this issue and been able to fix it?

Russ

Answer

Figured it out. Chrome only accepts requests for location from "secure" sources.

Explained here. https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only

The issue can fixed by securing your website to use https. Github pages works fine since it is https.

Comments