4
I got the following WebView
:
WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.getSettings().setBuiltInZoomControls(true);
myWebView.loadUrl('http://192.168.0.4:8080/map/index.html?value_id=666');
Within the index.html
has a Google map, requested through the Google Maps API, which contains some requests in AJAX(GET
,POST
, in a local server), seeking some markers in the database. In the browser it works normally, but inside the application it does not work. My suspicion is that these requests are not working because the markers are not appearing on the map. Here came the question:
- Does AJAX requests work in Webview? If so, what did I fail to set in Webview to work properly? If not, there is a viable alternative to circumventing it ?
See the tests
In the browser:
In the app: