(android) WebViewClient does not work when url is redirected
<p>I am facing problem when url is redirected. I set webviewclient and 
It is supposed to finish webview activity when url is redirected.
But it is not working and I wonder why... below is my code and I would be 
appreciated if anyone can help me. thx.</p>

<pre><code>public class WebViewActivity extends Activity {

WebView mWebView;
String fbRegsitered = "http://m.facebook.com/gettingstarted/";
//"http://m.facebook.com/r.php?refid=0
String fbUnregisterd = "http://m.facebook.com/r.php?refid=0";
private ProgressDialog mSpinner;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.webview);
    mWebView = (WebView) findViewById(R.id.webview); 
    mWebView.getSettings().setJavaScriptEnabled(true);  
    mWebView.loadUrl("http://m.facebook.com/r.php");  
    mWebView.setWebViewClient(new HelloWebViewClient()); 
}

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

}

private class HelloWebViewClient extends WebViewClient { 

    @Override 
    public boolean shouldOverrideUrlLoading(WebView view, String url) { 
        //view.loadUrl(url); 
        if(url.contains(fbRegsitered)){
            WebViewActivity.this.finish();
        }
        if(url.startsWith(fbUnregisterd)){              
            //finish();
        }
        return true; 
    } 
}
}
</code></pre>
