mejkan mejkan -5 years ago 139
Android Question

webview not openning link in android?

i am trying to open any link like "
" but not opening. please tell me what i am missing . this is the main activity class code.

protected void onCreate(Bundle savedInstanceState) {

final ProgressDialog progressDialog = new ProgressDialog(MainActivity.this);

WebView webview= (WebView) findViewById( );

webview.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
if (progress == 100) {
progressDialog.dismiss(); }


Answer Source

Add, in onCreate, after your webview declaration:

webview.setWebViewClient(new WebViewClient());

You may need to enable JavaScript depending on what else you need to do. For that use:


And do not forget to add:

<uses-permission android:name="android.permission.INTERNET"/>

In your manifest.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download