Android: Using html5 to determine geolocation in webview with javascript api

前端 未结 4 1970
孤独总比滥情好
孤独总比滥情好 2020-12-08 17:34

I\'m currently having an issue with geolocation in a webview. I have a webapp. I\'m currently not using phonegap or any other mobile framework. I\'ve been unsuccessful at ge

4条回答
  •  一个人的身影
    2020-12-08 17:59

    Your problem may be the same problem with Android WebView using Geolocation.
    I think HTML5 use local database, so you need add some HTML5 requirements like this

    // HTML5 API flags
    webView.getSettings().setAppCacheEnabled(true);
    webView.getSettings().setDatabaseEnabled(true);
    webView.getSettings().setDomStorageEnabled(true);
    

提交回复
热议问题