如何从在Android浏览器中打开一个网页检测用户的位置? [英] How do I detect user's location from a webpage opened in the Android browser?

查看:128
本文介绍了如何从在Android浏览器中打开一个网页检测用户的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android浏览器访问 www.google.com (或甚至一个Android欺骗用户代理), presents的选项为共享位置。当点击,它采用GPS /手机天线塔找出位置。我试过的 google.loader.clientLocation 的但只能使用IP地址。

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.

有没有一种方法能够利用Android操作系统,并获得GPS数据从一个普通的Web应用程序(而不是一个Android应用程序),类似于谷歌的方式做?

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?

[也许谷歌利用Android上的谷歌Gears的应用程序来访问这些数据。]

谢谢!

推荐答案

我是想,最近和发现这个论坛发帖有趣。我没有找到一个真正的好办法,要么做到这一点,它看起来并不像我们能做到这一点,而无需编写自己的应用程序,它会打开一个浏览器实例。 http://androidforums.com/support/8868-how-get -GPS坐标 - browser.html

I was trying that recently and found this forum posting interesting. I did not find a real good way to do this either and it doesn't look like we can do that without writing our own app which opens a browser instance. http://androidforums.com/support/8868-how-get-gps-coordinates-browser.html

这篇关于如何从在Android浏览器中打开一个网页检测用户的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆