WebViewCompat
open class WebViewCompat
kotlin.Any | |
↳ | androidx.webkit.WebViewCompat |
Compatibility version of android.webkit.WebView
Summary
Nested classes | |
---|---|
abstract |
Callback interface supplied to |
abstract |
This listener receives messages sent on the JavaScript object which was injected by |
Public methods | |
---|---|
open static Unit |
addWebMessageListener(@NonNull webView: WebView, @NonNull jsObjectName: String, @NonNull allowedOriginRules: MutableSet<String!>, @NonNull listener: WebViewCompat.WebMessageListener) Adds a |
open static Array<WebMessagePortCompat!> |
createWebMessageChannel(@NonNull webview: WebView) Creates a message channel to communicate with JS and returns the message ports that represent the endpoints of this message channel. |
open static PackageInfo? |
getCurrentWebViewPackage(@NonNull context: Context) If WebView has already been loaded into the current process this method will return the package that was used to load it. |
open static Uri |
Returns a URL pointing to the privacy policy for Safe Browsing reporting. |
open static WebChromeClient? |
getWebChromeClient(@NonNull webview: WebView) Gets the WebChromeClient. |
open static WebViewClient |
getWebViewClient(@NonNull webview: WebView) Gets the WebViewClient for the WebView argument. |
open static WebViewRenderProcess? |
getWebViewRenderProcess(@NonNull webview: WebView) Gets the WebView renderer associated with this WebView. |
open static WebViewRenderProcessClient? |
getWebViewRenderProcessClient(@NonNull webview: WebView) Gets the renderer client object associated with this WebView. |
open static Boolean |
Returns true if |
open static Unit |
postVisualStateCallback(@NonNull webview: WebView, requestId: Long, @NonNull callback: WebViewCompat.VisualStateCallback) Posts a |
open static Unit |
postWebMessage(@NonNull webview: WebView, @NonNull message: WebMessageCompat, @NonNull targetOrigin: Uri) Post a message to main frame. |
open static Unit |
removeWebMessageListener(@NonNull webview: WebView, @NonNull jsObjectName: String) Removes the |
open static Unit |
setSafeBrowsingAllowlist(@NonNull hosts: MutableSet<String!>, @Nullable callback: ValueCallback<Boolean!>?) Configures a set of hosts (domain names/IP addresses) that are exempt from SafeBrowsing checks. |
open static Unit |
setSafeBrowsingWhitelist(@NonNull hosts: MutableList<String!>, @Nullable callback: ValueCallback<Boolean!>?) Sets the list of hosts (domain names/IP addresses) that are exempt from SafeBrowsing checks. |
open static Unit |
setWebViewRenderProcessClient(@NonNull webview: WebView, @NonNull executor: Executor, @NonNull webViewRenderProcessClient: WebViewRenderProcessClient) Sets the renderer client object associated with this WebView. |
open static Unit |
setWebViewRenderProcessClient(@NonNull webview: WebView, @Nullable webViewRenderProcessClient: WebViewRenderProcessClient?) Sets the renderer client object associated with this WebView. |
open static |