android 监听 webkit,androidx.webkit

androidx.webkit

Requirements

The minimum sdk version to use this library is 14.

How to declare the dependencies to use the library

Inside your app's build.gradle file, include this line in dependencies:dependencies {

...

implementation 'androidx.webkit:webkit:1.2.0'

}

Migrating to androidx.webkit

For static methods:

Old code:if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {

WebView.startSafeBrowsing(appContext, callback);

}

New code:if (WebViewFeature.isFeatureSupported(WebViewFeature.START_SAFE_BROWSING)) {

WebViewCompat.startSafeBrowsing(appContext, callback);

}

Or, if you are using a non-static method:

Old code:if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {

myWebView.postVisualStateCallback(requestId, callback);

}

New code:if (WebViewFeature.isFeatureSupported(WebViewFeature.VISUAL_STATE_CALLBACK)) {

WebViewCompat.postVisualStateCallback(myWebView, requestId, callback);

}

Interfaces

Classes

This class represents the JavaScript object injected by

ProxyConfig builder.

Class that holds a scheme filter and a proxy URL.

Manages setting and clearing a process-specific override for the Android system-wide proxy

settings that govern network requests made by

Base class for clients to capture Service Worker related callbacks,

see

Manages Service Workers used by WebView.

Manages settings state for all Service Workers.

Holds tracing configuration information and predefined settings

for

Manages tracing of WebViews.

The Java representation of the HTML5 PostMessage event.

The listener for handling MessagePort events.

Helper class to load local files including application's static assets and resources using

http(s):// URLs inside a

Handler class to open a file from assets directory in the application APK.

Handler class to open files from application internal storage.

Handler class to open a file from resources directory in the application APK.

Compatibility version of

Utility class for checking which WebView Support Library features are supported on the device.

WebViewRenderProcess provides an opaque handle to a WebView renderer.

Used to receive callbacks on

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值