Android 是否可以访问WebView缓存?

Android 是否可以访问WebView缓存?,android,caching,webview,android-webview,browser-cache,Android,Caching,Webview,Android Webview,Browser Cache,我有一个可以访问网页的网络视图。当我离线时,是否可以访问以前下载的图像? 如果可能的话,我该怎么做 提前感谢。是的,您可以,至少对于Android 2.3及更低版本 如果要查看整个缓存文件夹,它位于以下位置: <android cache dir>/<your app package>/cache/webviewCache/ CacheManager:如果其他人面临此问题,我也会遇到类似的问题,我会通过手动管理(保存和检索)我的应用缓存来解决此问题。我的相关帖子。仅供参

我有一个可以访问网页的网络视图。当我离线时,是否可以访问以前下载的图像? 如果可能的话,我该怎么做


提前感谢。

是的,您可以,至少对于Android 2.3及更低版本

如果要查看整个缓存文件夹,它位于以下位置:

<android cache dir>/<your app package>/cache/webviewCache/

CacheManager

如果其他人面临此问题,我也会遇到类似的问题,我会通过手动管理(保存和检索)我的应用缓存来解决此问题。我的相关帖子。

仅供参考,CacheManager从ICS开始就被弃用,并在4.2中被删除。(上面的链接会产生404)。下载是指浏览?如果你下载到手机/平板电脑上,你应该可以进入你的多媒体资料,在这里看到相同的内容,为应用程序webview实现我自己的缓存,我用
shouldinterceptrequest
@AnnArbor87截取所有内容,你能告诉我们你在shouldinterceptrequest方法中做了什么吗?
String uri = "http://the url of the image that you need";
String hashCode = String.format("%08x", uri.hashCode());
File file = new File(new File(getCacheDir(), "webviewCache"), hashCode);
// if the call file.exist() returns true, then the file presents in the cache