• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

html page is not loading in webviewclient

Hy,
my question is that,my local html file that exist in asset's folder is only loading in webview not in webviewclient.
iam passing querystring from one page to another and want to get that querystring in onLoadResource() method of webviewclient.here is mycode but its not working

public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
progressBar=(ProgressBar)findViewById(R.id.progressbar);
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setSavePassword(false);
mWebView.getSettings().setSaveFormData(false);
progressBar.setVisibility(ProgressBar.GONE);
mWebView.setWebChromeClient(new WebChromeClient()
{

});
mWebView.setWebViewClient(new WebViewClient()
{
public boolean shouldOverrideUrlLoading(WebView view, String url)
{


view.loadUrl (url);
//mWebView.loadData("", "text/html", "utf-8");
return false;
}
});

mWebView.loadUrl("file:///android_asset/abc.html");

}
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones