// start non-ingress-intel-urls in another app... @Override public boolean shouldOverrideUrlLoading(final WebView view, final String url) { if (url.contains("conflogin") || url.contains("ServiceLogin") || url.contains("appengine.google.com")) { Log.d("Google login"); return false; } else if (isIntelUrl(url)) { Log.d("intel link requested, reset app and load " + url); mIitc.reset(); mIitc.setLoadingState(true); return false; } else { Log.d("no ingress intel link, start external app to load url: " + url); final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); // make new activity independent from iitcm intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mIitc.startActivity(intent); } return true; }
// inject the iitc-script and load the intel url // plugins are injected onPageFinished public void loadUrl(String url) { reset(); setLoadingState(true); url = addUrlParam(url); mIitcWebView.loadUrl(url); }