Created
July 8, 2015 19:26
-
-
Save Karthik128/aaa70dfc8b3910285092 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.androidwebviewapp.karthik; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
/** | |
* Created by Karthik's on 3/5/2015. | |
*/ | |
public class MyAppWebViewClient extends WebViewClient { | |
@Override | |
public boolean shouldOverrideUrlLoading(WebView view, String url) { | |
if(Uri.parse(url).getHost().endsWith("karthiktechfreak.blogspot.in")) { | |
return false; | |
} | |
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); | |
view.getContext().startActivity(intent); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment