I load a local html file (from assets folder) to the app WebView.
In the HTML I run a jQuery.getJSON(url). the url is a remote server.
This action fails, and I'm guessing because of a different origin issue (cross domain). I run the same file on chrome and there it specifically says so.
Is there a way to allow the WebView in Android to load data from remote server on a local loaded HTML file?
Best Answer
Today morning I found solution that seems to be working.
The Java part
Initialize your WebView:
get WebView settings:
set following settings:
now you can load your your html file by standard way:
The Javascript part
Create XHR request by standard way
Print the result somewhere