I am having a problem with Webview in that it will not use the cache.

I start my app up, load the HTML5 page, then back out of the page,
enter airplane mode on the phone, then try to go to the web page
again. It should be cached, but I get a message saying that the URL
could not be retrieved.

Here is my code pertaining to this. Am I doing something wrong? ? ? ?

        webview.getSettings().setJavaScriptEnabled(true);
        webview.addJavascriptInterface(new JavascriptBinder(this),
"MyJavascriptBinder");
        webview.setVerticalScrollBarEnabled(false);
        webview.setHorizontalScrollBarEnabled(false);
        webview.getSettings().setBuiltInZoomControls(true);
        webview.getSettings().setDomStorageEnabled(true);
        webview.getSettings().setBuiltInZoomControls(true);
        webview.getSettings().setSupportZoom(true);
        webview.getSettings().setLoadWithOverviewMode(true);
        webview.getSettings().setUseWideViewPort(true);
        webview.getSettings().setAppCacheMaxSize(1024*1024*8);
        webview.getSettings().setAppCachePath("/data/data/
com.html5webappcache.android/cache");
        webview.getSettings().setAllowFileAccess(true);
        webview.getSettings().setAppCacheEnabled(true);
        webview.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to