I know this question has already been asked before but the solutions doesn't work or are deprecated..
So, I want get the html code of a webpage in android in java, if somebody can help me..
I know this question has already been asked before but the solutions doesn't work or are deprecated..
So, I want get the html code of a webpage in android in java, if somebody can help me..
use webview to load url in your app then use the following code to get the html
wvbrowser.evaluateJavascript(
        "(function() { return ('<html>'+document.getElementsByTagName('html')[0].innerHTML+'</html>'); })();",
         new ValueCallback<String>() {
            @Override
            public void onReceiveValue(String html) {
                Log.d("HTML", html); 
                // code here
            }
    });
taken from
 
    
    