Code example for WebView: Displaying local web pages

Methods: getSettingsloadDatasetScrollBarStylesetWebChromeClientsetWebViewClient, setFocusable, setFocusableInTouchMode

0
	    loadingmess.show();
 
	    WebView wbv;
 
	       wbv = (WebView) findViewById(R.id.VideoView);
	       wbv.setFocusable(true);
	       wbv.setFocusableInTouchMode(true);
	       wbv.getSettings().setJavaScriptEnabled(true);
	       wbv.getSettings().setPluginState(PluginState.ON);
	       wbv.getSettings().setRenderPriority(RenderPriority.HIGH);
	       wbv.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
	       wbv.getSettings().setDomStorageEnabled(true);
	       wbv.getSettings().setDatabaseEnabled(true);
	       wbv.getSettings().setAppCacheEnabled(true);
	       wbv.getSettings().setAllowFileAccess(true);
	       wbv.setWebViewClient(new WebViewClient());
	       wbv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
	       wbv.setWebChromeClient(new WebChromeClient());
	        
	       String htm = "<object width='480' height='330'><param name='movie' value='http://www.youtube.com/v/G-tZHIfKD2A?version=3&amp;hl=pt_BR&amp;rel=0'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/G-tZHIfKD2A?version=3&amp;hl=pt_BR&amp;rel=0' type='application/x-shockwave-flash' width='480' height='330' allowscriptaccess='always' allowfullscreen='true' /></object>";
	       String html ="<html><body><iframe class=\"youtube-player\" type=\"text/html\" src=\"http://www.youtube.com/embed/G-tZHIfKD2A?feature=player_detailpage\" frameborder=\"0\" allowfullscreen><object width='480' height='330'><param name='movie' value='http://www.youtube.com/v/G-tZHIfKD2A?version=3&amp;hl=pt_BR&amp;rel=0'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/G-tZHIfKD2A?version=3&amp;hl=pt_BR&amp;rel=0' type='application/x-shockwave-flash' width='480' height='330' allowscriptaccess='always' allowfullscreen='true' /></object></iframe></body></html>";
	       String mime = "text/html";
	       String utl = "http://www.pocketjourney.com/downloads/pj/video/famous.3gp";
	       String encoding = "utf-8";   
	       //wbv.loadUrl(utl); 
	       wbv.loadData(html, mime,null);
		/*if (path == "") { 
            // Tell the user to provide a media file URL/path. 
            Toast.makeText( 
                    VideoViews.this, 
                    "Please edit VideoViewDemo Activity, and set path" 
Stop searching for code, let great code find you!  Add Codota to your java IDE