Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I detect user's location from a webpage opened in the Android browser?

Visiting www.google.com on the Android browser (or even with an android spoofed user-agent), presents the option to "Share Location". When clicked, it uses the GPS/Cell phone towers to figure out the location. I tried the google.loader.clientLocation but that only works using the IP address.

Is there a method to tap into the Android OS and access GPS data from a regular web application (and not an Android application) similar to the way Google does?

[Perhaps Google uses the Google Gears app on Android to access this data.]

Thanks!

like image 443
eapen Avatar asked Dec 10 '25 22:12

eapen


1 Answers

This is an HTML5 API, and it'll work on Webkit-derivatives, Chrome, and Firefox 3.5 (for now).

  • http://dev.w3.org/geo/api/spec-source.html
  • http://merged.ca/iphone/html5-geolocation
like image 126
ceejayoz Avatar answered Dec 12 '25 11:12

ceejayoz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!