
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源 去关联
本项目是基于开源项目CacheWebView进行ohos化的移植和开发的,可以通过项目标签以及github地址(https://github.com/yale8848/CacheWebView )追踪到原项目版本
方法1.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
……
}
方法2.
repositories {
maven {
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
}
}
dependencies {
implementation 'io.github.dzsf:cache-web-view:1.0.1'
}
public void init(WebViewCacheInterceptor.Builder builder)
public static WebViewCacheInterceptorInst getInstance()
public ResourceResponse interceptRequest(ResourceRequest request)
public ResourceResponse interceptRequest(String url)
public void loadUrl(WebView webView, String url)
public void loadUrl(String url, String userAgent)
public void loadUrl(String url, Map<String, String> additionalHttpHeaders, String userAgent)
public void loadUrl(WebView webView, String url, Map<String, String> additionalHttpHeaders)
public void clearCache()
public void enableForce(boolean force)
public InputStream getCacheFile(String url)
public void initAssetsData()
public File getCachePath()
项目地址:https://gitee.com/openneusoft/CacheWebView
IDE官方下载地址:https://developer.harmonyos.com/cn/develop/deveco-studio