SHARE
TWEET

Untitled

a guest Oct 24th, 2014 141 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.     package com.techtutorials; //replace this with your package name
  3.     import android.webkit.WebView;
  4.     import android.webkit.WebViewClient;
  5.     import android.net.Uri;
  6.  
  7.     public abstract class WebViewtechtutorials extends WebViewClient
  8.     {
  9.         @Override
  10.         public boolean shouldOverrideUrlLoading(WebView view, String url)
  11.         {
  12.             if (Uri.parse(url).getHost().equals("www.techtutorials.com")) //replace this with the url for your website
  13.                 return false;
  14.            
  15.             launchExternalBrowser(url);            
  16.             return true;
  17.         }
  18.        
  19.         public abstract void launchExternalBrowser(String url);
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top