private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
WebView w=(WebView) dialog.findViewById(R.id.webView);
WebView.enablePlatformNotifications();
w.getSettings().setJavaScriptEnabled(true);
w. getSettings().setJavaScriptCanOpenWindowsAutomatically (false);
w. getSettings().setPluginsEnabled (true);
w.loadUrl("http://www.agaraadhi.com");
w.setWebViewClient(new HelloWebViewClient());
I'm trying to load a web page into the web view.I get web page not available error.I can access the page from the default browser.I set the permission in manifest.But the below code works fine.
Uri uri = Uri.parse("http://www.agaraadhi.com");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);