Hey G., Redirection is done on the server side. So you don't really have a way of controlling that. The server does the redirection wether you like it or not BEFORE sending any web pages. So that you can't get the original site you were going for if the server doesn't let you.
I'm not sure I understand why you would want to override the redirection but my guess is that you are redirected to a mobile website and that you want to land on the desktop website. In this case, depending on what triggers the redirection on the server, you might try changing the User Agent and/or display size header of the request. Most website use the User Agent header to tell if the user is on a mobile device or on a desktop computer and then serves the website accordingly. Good luck. Yahel On 5 août, 10:16, gaurav gupta <gaurav.gupta...@gmail.com> wrote: > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en