WebSettings setDatabaseEnabled - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for WebSettings setDatabaseEnabled method.

This code example shows how to use the following methods:setDatabaseEnabled, setDatabasePath
 
    @Override 
    public void applyWebSettings(WebView view) {
        super.applyWebSettings(view);
        WebSettings settings = view.getSettings();
        settings.setDatabaseEnabled(true);
 
        Context context = view.getContext();
        String databasePath = context.getDir("database", Context.MODE_PRIVATE).getPath();
        settings.setDatabasePath(databasePath);
    } 
 
} 
7
CodeRank
This code example shows how to use the following methods:setAllowFileAccess, setAppCacheEnabled, setAppCacheMaxSize, setAppCachePath, setCacheMode
7
CodeRank
This code example shows how to use the following methods:setAppCacheEnabled, setDatabaseEnabled, setDatabasePath, setDomStorageEnabled, setJavaScriptEnabled
This code example shows how to use the following methods:setAppCacheEnabled, setAppCacheMaxSize, setAppCachePath, setDatabaseEnabled, setDatabasePath
		wb.loadUrl(HTML_TESTS_URL);
		 
		WebSettings webSettings = wb.getSettings();
		 
		//page needs javascript enabled to run 
		webSettings.setJavaScriptEnabled(true);
		 
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR_MR1) {
			webSettings.setDomStorageEnabled(true);
			webSettings.setAppCacheEnabled(true);
			webSettings.setAppCachePath(getCacheDir().getAbsolutePath());
	        webSettings.setAppCacheMaxSize(1 * 1024 * 1024);
		} 
		 
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) {
	        webSettings.setDatabaseEnabled(true);
	        webSettings.setDatabasePath("/data/data/" + getPackageName() + "/databases");
		} 
		 
		//show content 

6
CodeRank
This code example shows how to use the following methods:setBuiltInZoomControls, setDatabaseEnabled, setDatabasePath, setDomStorageEnabled, setGeolocationEnabled
import android.webkit.WebView; 
 
public class TxlWebUtil { 
	public static void settingWebView(WebView wv,Activity ctx){
		WebSettings settings = wv.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setJavaScriptCanOpenWindowsAutomatically(true);
        settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
        // Set the nav dump for HTC 
        //settings.setNavDump(true); 
        // Enable database 
        settings.setDatabaseEnabled(true);
        String databasePath = ctx.getDir("database", Context.MODE_PRIVATE).getPath();
        settings.setDatabasePath(databasePath);
        // Enable DOM storage 
        settings.setDomStorageEnabled(true);
        // Enable built-in geolocation 
        settings.setGeolocationEnabled(true);
        settings.setBuiltInZoomControls(true);
	} 

6
CodeRank
This code example shows how to use the following methods:setBuiltInZoomControls, setDatabaseEnabled, setDatabasePath, setDomStorageEnabled, setGeolocationEnabled
        wv.setWebChromeClient(new LibWebChromeClient());
        wv.loadUrl("http://192.168.92.61:8080/android-lib/assets/www/load_from_remote.html");
    } 
    public void settingWebView(WebView wv,Activity ctx){
        WebSettings settings = wv.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setJavaScriptCanOpenWindowsAutomatically(true);
        settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
        // Set the nav dump for HTC 
        settings.setNavDump(true);
        // Enable database 
        settings.setDatabaseEnabled(true);
        String databasePath = ctx.getDir("database", Context.MODE_PRIVATE).getPath();
        settings.setDatabasePath(databasePath);
        // Enable DOM storage 
        settings.setDomStorageEnabled(true);
        // Enable built-in geolocation 
        settings.setGeolocationEnabled(true);
        settings.setBuiltInZoomControls(true);
    } 

5
CodeRank
This code example shows how to use the following methods:setAppCacheEnabled, setAppCacheMaxSize, setAppCachePath, setCacheMode, setDatabaseEnabled
 
    WebSettings settings = webView.getSettings();
 
    // Enabling the app cache without setting a path crashes webcore on 
    // gingerbread.  Explicitly setting the path seems to work. 
    settings.setAppCacheEnabled(true);
    settings.setAppCachePath(appCacheRoot.getAbsolutePath());
    settings.setAppCacheMaxSize(BROWSER_SETTINGS_APP_CACHE_SIZE);
    settings.setCacheMode(WebSettings.LOAD_DEFAULT);
    settings.setDatabaseEnabled(true);
    settings.setDomStorageEnabled(true);
    settings.setJavaScriptCanOpenWindowsAutomatically(true);
    settings.setJavaScriptEnabled(true);
    settings.setPluginsEnabled(true);
    settings.setSupportMultipleWindows(true);
 
    CookieManager.getInstance().setAcceptCookie(true);
  } 
 
  public void setCondition(ConditionVariable cv) {
4
CodeRank
This code example shows how to use the following methods:setAllowUniversalAccessFromFileURLs, setBuiltInZoomControls, setDatabaseEnabled, setDatabasePath, setDefaultZoom
This code example shows how to use the following methods:setAppCacheEnabled, setAppCachePath, setDatabaseEnabled, setDatabasePath, setDomStorageEnabled
4
CodeRank
This code example shows how to use the following methods:setBuiltInZoomControls, setCacheMode, setDatabaseEnabled, setDomStorageEnabled, setJavaScriptEnabled
        }); 
         
                 
       	yDAuthView.addJavascriptInterface(this , "auth");
        WebSettings webSettings = yDAuthView.getSettings();
        webSettings.setPluginsEnabled(true);
        webSettings.setPluginState(WebSettings.PluginState.ON);
        webSettings.setSavePassword(false);
        webSettings.setSaveFormData(false);
        webSettings.setJavaScriptEnabled(true);
        webSettings.setRenderPriority(RenderPriority.HIGH);
        //webSettings.setCacheMode(WebSettings.LOAD_DEFAULT); 
        webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
        webSettings.setDatabaseEnabled(true);
        webSettings.setDomStorageEnabled(true);
        webSettings.setUseWideViewPort(true);
        webSettings.setBuiltInZoomControls(true);
        //webSettings.setSupportZoom(false); 
                
        //yDADView.loadUrl("http://pcbang.ncucu.com/test_widthheight.asp?gameid="+gameID+"&width="+webImageWidth+"&height="+webImageHeight); 

3
CodeRank

Related WebSettings setDatabaseEnabled Questions & Answers:

setDatabaseEnabled Method Overview
Sets whether the database storage API is enabled.
See Code Examples for other Android WebSettings Methods: