DarkAgent2005
Lurker
Hello,
I have an Android app that uses WebView to display my website. I want to make it so that whenever the app is closed or stopped being used, the app clear's WebView's cache of HTML files. Currently, I have the following code which clears *all* cache but I only want to clear a specific type of files from the cache (i.e. HTML files):
Any way for me to only clear a specific type of file from cache? Thanks!
I have an Android app that uses WebView to display my website. I want to make it so that whenever the app is closed or stopped being used, the app clear's WebView's cache of HTML files. Currently, I have the following code which clears *all* cache but I only want to clear a specific type of files from the cache (i.e. HTML files):
@override
protected void onStop(){
super.onStop();
browser.clearCache(true);
}
@override
protected void onDestroy() {
super.onDestroy();
browser.clearCache(true);
}
protected void onStop(){
super.onStop();
browser.clearCache(true);
}
@override
protected void onDestroy() {
super.onDestroy();
browser.clearCache(true);
}
Any way for me to only clear a specific type of file from cache? Thanks!