mejkan mejkan - 11 months ago 31
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(); }



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.