在 Webview 中使用 Gears 进行地理定位? (适用于 1.5 部手机)

发布于 2024-09-15 21:04:24 字数 213 浏览 2 评论 0原文

我能够在我的 webview 中为任何运行 2.0 及更高版本的 Android 手机轻松设置地理定位辅助功能。不过,我确实需要让此功能也能在 1.5 和 1.6 手机上运行。据我所知,这个功能似乎是通过“Gears”来完成的,显然有一种方法可以使用 addJavascriptInterface 来实现这一点。我似乎在任何地方都找不到任何例子。事实上,我很惊讶没有更多关于这方面的信息,或者至少很容易找到信息。

I was able to setup geolocation accessibility in my webview for any android phone running 2.0 and up easily. However I really need to get this feature working on 1.5 and 1.6 phones as well. From what i've read it seems like this feature used to be accomplished with "Gears" and apparently there is a way to use addJavascriptInterface to implement this. I can't seem to find any examples anywhere. I'm actually suprised there isn't more information on this or at least easy to find information.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

老街孤人 2024-09-22 21:04:24

从我读到的内容看来是这样的
功能用于完成
“齿轮”,显然有办法
使用 addJavascriptInterface 来
实现这个。

不,没有。 Gears 在 WebView 中不受支持,仅在浏览器应用程序中受支持。

From what i've read it seems like this
feature used to be accomplished with
"Gears" and apparently there is a way
to use addJavascriptInterface to
implement this.

No, there is not. Gears is not supported in WebView, only in the Browser application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文