Code example for WebView: Displaying web pages

Methods: canGoBackgoBackloadUrl, getContext

0
		public boolean shouldOverrideUrlLoading(WebView view, String url) {
			Util.log(TAG, "***** load URL=" + url);
			if (Util.isVideoOrAudioUrl(url)) {
				// startStream(url, view); 
			} else if (url.contains("_errorPage.html")) {
				Toast.makeText(view.getContext(), getString(R.string.networkError), Toast.LENGTH_LONG).show();
				if (view != null && view.canGoBack()) {
					view.goBack();
				} else { 
					finish();
				} 
				return true; 
			} else { 
				if (url != null && url.contains("sendung.php")) {
					activeUrl = Util.getActiveUrl(view.getContext(), url);
				} else { 
					activeUrl = url;
				} 
				view.loadUrl(url);
			} 
			return true; 
		} 
 
		@Override 
Stop searching for code, let great code find you!  Add Codota to your java IDE