HTML5 Geolocation not working on Android
It seems that, on old android stock browser and chrome version, GPS detection don’t works out of the box using HTML5 Geolocation API.
Try this fiddle: http://jsfiddle.net/CvSW4/352/
If it doesn’t work try to:
- Enable GPS
- Restart your phone
Thanks for the help Jonathan, your jsfiddle helped me figure out the issue. I tried to get this to work on many android phones. Chrome gave me the unsecure location error, which is crap because i’m able to get location from my desktop pc from an unsecure AWS server. On firefox, it was giving me the error that I didn’t allow location. It didn’t give me a prompt and I enabled every location setting on my phone. The solution was Dolphin browser. It was the only one which actually presented a “grant location” prompt and worked flawlessly after that!