Nick, I'm not quite understanding how you got this to clear the
cache... right now, i have a webview with the following code:
webView = (WebView) findViewById(R.id.myWebView);
webView.setWebViewClient(new Callback());
in the Callback method, I have settings for the webView as well as
load the URL. I created another method in the WebViewClient subclass
named "onPageFinished()" and it's as follows:
public void onPageFinished()
{
webView.clearCache(true);
webView.clearHistory();
webView.destroy();
}
it runs, but I don't see that it's clearing the cache....
On Dec 29 2008, 12:47 pm, Nick <[email protected]> wrote:
> I guess onStop() is the wrong place to do this. Moving the call to
> WebViewClient.onPageFinished fixed it.
>
> On Dec 28, 10:34 pm, Nick <[email protected]> wrote:
>
> > Hello,
>
> > In onCreate() I instantiate a new WebView. In onStop() I call
> > clearCache(true) and destroy() on the WebView. This does not seem to
> > be enough to clear the cache since I see files piling up in /data/data/
> > MYAPP/cache/webviewCache. What is the proper way to remove this data?
>
> > Thank you,
> > Nick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---