Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.techtutorials; //replace this with your package name
- import android.webkit.WebView;
- import android.webkit.WebViewClient;
- import android.net.Uri;
- public abstract class WebViewtechtutorials extends WebViewClient
- {
- @Override
- public boolean shouldOverrideUrlLoading(WebView view, String url)
- {
- if (Uri.parse(url).getHost().equals("www.techtutorials.com")) //replace this with the url for your website
- return false;
- launchExternalBrowser(url);
- return true;
- }
- public abstract void launchExternalBrowser(String url);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement