I have 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');
Inside index.html
has a Google map, which is requested through the Google Maps API, which contains some AJAX requests ( GET
, POST
, a local server) looking for some markers in the database . In the browser works normally, however within the application does not work. My suspicion is that these requests are not working because the markers are not appearing on the map. Here came the doubt:
- Does AJAX request work in Webview? If so, what did I fail to set in WebView to work correctly? If not, is there a viable alternative to circumvent it?
See the tests
In browser :
Noapp: