Hi Guys,

M calling a webview to show a website, but in mobile or tab.
but url is redirecting .
i want to open a particular website , not its redirected url.
m using this code ,
Kindly check my code and let me know where is problem.
its urgent.
Thanks in Advance.


 WebView mWebView;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mWebView = (WebView) findViewById(R.id.webview);
        //mWebView.getSettings().setJavaScriptEnabled(true);

        mWebView.loadUrl("example url");
    mWebView.requestFocus();


        mWebView.setWebViewClient(new WebViewClient()
        {

        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url){
        // do your handling codes here, which url is the requested url
        // probably you need to open that url rather than redirect:
        view.loadUrl(url);
        return true; // then it is not handled by default action
        }});


        }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to