Code example for WebView: Displaying web pages

Methods: addJavascriptInterfacegetSettingsloadUrlsetWebChromeClientsetWebViewClient

0
		} 
 
		mAccessControlLoginContext.AccessTokenHandler.setTokenReceiver(this);
		this.getWindow().requestFeature(Window.FEATURE_PROGRESS);
 
		WebView webview = new WebView(this);
		setContentView(webview);        
		webview.getSettings().setJavaScriptEnabled(true);
		webview.addJavascriptInterface(new AccessControlJavascriptNotify(mAccessControlLoginContext.AccessTokenHandler), "external");
		webview.setWebViewClient(new AuthWebViewClient());
		webview.setWebChromeClient(new AuthWebChromeClient(this));
		webview.loadUrl(loginUrl);
	} 
 
	@Override 
	public void onAccessTokenReceived(IAccessToken token, int tokenStatus) {
		Intent intent = (tokenStatus == AccessTokenConstants.VALID_TOKEN) ? new Intent(
				this, mAccessControlLoginContext.SuccessLoginActivity)
				: new Intent(this,
						mAccessControlLoginContext.ErrorLoginActivity);
		intent.putExtra(AccessControlLoginActivity.AuthenticationTokenKey,