Is there a way I can change:
InputStream is = getAssets().open("xxx.html");
To:
InputStream is = ("http://www.xxx.com.br/xxx.html");
Maybe using HttpURLConnection but I do not know how to implement it.
Here's a piece of my code where I'm trying to implement this:
try {
InputStream is = getAssets().open("xxx.html");
String data = getResultFromStream(is);
WebSettings ws = webView.getSettings();
ws.setJavaScriptEnabled(true);
ws.setJavaScriptCanOpenWindowsAutomatically(true);
ws.setDomStorageEnabled(true);
MyWebChromeClient chromeClient = new MyWebChromeClient();
MyWebViewClient webViewClient = new MyWebViewClient();
webView.setWebChromeClient(chromeClient);
webView.setWebViewClient(webViewClient);
webView.setBackgroundColor(0);
webView.loadData(data, "text/html", "UTF-8");
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}