Code example for WebView

Methods: addJavascriptInterfacegetSettingssetBackgroundColor, setKeepScreenOn, setSoundEffectsEnabled

0
	/** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) {    	
        super.onCreate(savedInstanceState);             
         
        webview = new WebView(this);
        webview.setBackgroundColor(Color.BLACK);
        webview.setKeepScreenOn(true);
        jsBridge = new JSBridge(this);
        webview.addJavascriptInterface(jsBridge, "jsBridge");
        webview.setSoundEffectsEnabled(true); // for the tick
        WebSettings webSettings = webview.getSettings();
        webSettings.setJavaScriptEnabled(true);
        webSettings.setAllowFileAccess(true);
        webSettings.setLoadsImagesAutomatically(true);
//      TODO sound support webview.addJavascriptInterface(obj, interfaceName); 
        setContentView(webview);
		try { 
	//		AssetManager am = new AssetManager(); 
			ContentResolver cr = getContentResolver();		
Connect your IDE to all the code out there  Get Codota for Java