开发者

Getting location via a web application being run in a WebView

开发者 https://www.devze.com 2022-12-24 05:32 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号