通过在WebView中运行的Web应用程序获取位置 [英] Getting location via a web application being run in a WebView
本文介绍了通过在WebView中运行的Web应用程序获取位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从加载到WebView中的网页执行相同的操作在我自己的应用程序。是唯一能通过 WebView.addJavascriptInterface()
解决这个问题的方法,还是已经有了一个可供webapps使用的javascript接口?
解决方案
它通过HTML5完成。
查阅这里的Javascript:
http://dev.w3.org/geo/api/spec-source.html
m.google.com somehow requests the current location when loaded in Android's browser.
I want to do the same thing from a web page being loaded into a WebView in my own application. Is the only way to go about this with WebView.addJavascriptInterface()
, or is there already a javascript interface available for webapps to use?
解决方案
It's done via HTML5.
Lookup here the Javascript: http://dev.w3.org/geo/api/spec-source.html
这篇关于通过在WebView中运行的Web应用程序获取位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文