Created
March 25, 2019 16:13
-
-
Save biodunalfet/e207baf1e4e4275698c0305d73495aad 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
private class MyBrowser extends WebViewClient { | |
@SuppressWarnings("deprecation") | |
@Override | |
public boolean shouldOverrideUrlLoading(WebView view, String url) { | |
view.loadUrl(url); | |
return true; | |
} | |
@TargetApi(Build.VERSION_CODES.N) | |
@Override | |
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { | |
view.loadUrl(request.getUrl().toString()); | |
return true; | |
} | |
@Override | |
public void onPageStarted(WebView view, String url, Bitmap favicon) { | |
super.onPageStarted(view, url, favicon); | |
Log.d("started URLS", url); | |
showProgressIndicator(true); | |
} | |
@Override | |
public void onPageFinished(WebView view, String url) { | |
super.onPageFinished(view, url); | |
// Log.d("URLS", url); | |
showProgressIndicator(false); | |
Log.d("finished URLS", url); | |
if (url.contains(RaveConstants.RAVE_3DS_CALLBACK)) { | |
goBack(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment