Android App development - WebView is not working
<p>Android allows content of a URL to be displayed within an application using WebView.
However, for some reason it's not working for me. Below is the code that Iam using:</p>

<pre>
package com.news;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class NewsActivity extends Activity {
    WebView mWebView;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mWebView = (WebView) findViewById(R.id.webview);
        mWebView.setWebViewClient(new NewsClient());
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.getSettings().setDomStorageEnabled(true);
        mWebView.loadUrl("http://www.androidpeople.com");
    }

    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
            mWebView.goBack();            
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }

    private class NewsClient extends WebViewClient {

        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            System.out.println("URL: " + url);
            view.loadUrl(url);
            return true;
        }
    }
}
</pre>
