I am trying to get the full Html Source of the WebPage Loaded into the WebView and my Code is Working Fine But It's giving me null for One url( //mobile.twitter.com) While on Other pages of Twitter(like //mobile.twitter.com/account),it is working fine. But Give me an Error for the that One URl; My Code:
twitter_WebView.addJavascriptInterface(new LoadListener(), "HTMLOUT");
twitter_WebView.loadUrl("javascript:window.HTMLOUT.processHTML(document.documentElement.outerHTML); ");
class LoadListener{
@JavascriptInterface
public void processHTML(String html) throws IOException
{
pageHTML = html; // Giving Me Null here ///
})
}