How to determine the location of a user from a web page open in an Android browser?

Visiting www.google.com in an Android browser (or even using a canceled Android user agent) provides the option to "Share location . " When you click, it uses the GPS / cell phone towers to find out the location. I tried google.loader.clientLocation, but this only works using the IP address.

Is there a way to connect to the Android OS and access GPS data from a regular web application (rather than an Android application), similar to how Google does it?

[Google may use the Google Gears Android app to access this data.]

Thank!

+3
source share
3 answers

I tried this recently and found this forum interesting. I also did not find a suitable way to do this, and it does not seem that we can do this without creating our own application that opens a browser instance. http://androidforums.com/support/8868-how-get-gps-coordinates-browser.html

0
source

This is the HTML5 API, and it will work with Webkit derivatives, Chrome, and Firefox 3.5 (for now).

+3
source

Source: https://habr.com/ru/post/1726546/


All Articles