Hey. My app has a WebView which displays Google maps. I'm trying to limit the cache size to a reasonable one - like 2MB. After checking with settings->applications->manage applications I found out that regular page load gets the cache to 900kb. And dispite my efforts, I can't limit the cache size or monitor when the cache limit is being reached. If I'm playing with the map on the webview, the app can even reach 10MB and no "ache max size reached" message is received.
I used the following code: _webView.getSettings().setAppCacheMaxSize(2100000); //2MB _webView.setWebViewClient(new WebViewClient(){ @Override public void onReachedMaxAppCacheSize (long spaceNeeded, long totalUsedQuota, android.webkit.WebStorage.QuotaUpdater quotaUpdater){ Log.i(getClass().getName(), "App cache max size reached"); } }); and a breakpoint inside onReachedMaxAppCacheSize. Device is Nexus One. Am I doing something wrong? Is there a better way to control the cache? -- 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