Code example for GeolocationPermissions.Callback

Methods: invoke

0
		setLoading(); 
		 
		webview.setWebChromeClient(new WebChromeClient() {
			public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) {				
				super.onGeolocationPermissionsShowPrompt(origin, callback);
				callback.invoke(origin, true, false);
			}		 
		});  
		 
		webview.setWebViewClient(new WebViewClient() {
			@Override 
			public boolean shouldOverrideUrlLoading(WebView view, String url) {
				if(url.equals("http://www.beintoo.com/m/sdkandroid/dismisssmartwebui")){
					current.dismiss();
					return true; 
				} 
				return super.shouldOverrideUrlLoading(view, url);
			} 
 
			public void onReceivedError(WebView view, int errorCode, 
					String description, String failingUrl) {