WebViewFeature

open class WebViewFeature
kotlin.Any
   ↳ androidx.webkit.WebViewFeature

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

Summary

Constants
static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

static String

Feature for #isFeatureSupported(String).

Public methods
open static Boolean

Return whether a feature is supported at run-time.

Constants

DISABLED_ACTION_MODE_MENU_ITEMS

static val DISABLED_ACTION_MODE_MENU_ITEMS: String

Feature for #isFeatureSupported(String). This feature covers androidx.webkit.WebSettingsCompat#getDisabledActionModeMenuItems(WebSettings), and androidx.webkit.WebSettingsCompat#setDisabledActionModeMenuItems(WebSettings, int).

Value: "DISABLED_ACTION_MODE_MENU_ITEMS"

OFF_SCREEN_PRERASTER

static val OFF_SCREEN_PRERASTER: String

Feature for #isFeatureSupported(String). This feature covers androidx.webkit.WebSettingsCompat#getOffscreenPreRaster(WebSettings), and androidx.webkit.WebSettingsCompat#setOffscreenPreRaster(WebSettings, boolean).

Value: "OFF_SCREEN_PRERASTER"

RECEIVE_HTTP_ERROR

static val RECEIVE_HTTP_ERROR: String

Feature for #isFeatureSupported(String). This feature covers WebViewClientCompat#onReceivedHttpError(android.webkit.WebView, WebResourceRequest, * WebResourceResponse).

Value: "RECEIVE_HTTP_ERROR"

RECEIVE_WEB_RESOURCE_ERROR

static val RECEIVE_WEB_RESOURCE_ERROR: String

Feature for #isFeatureSupported(String). This feature covers WebViewClientCompat#onReceivedError(android.webkit.WebView, WebResourceRequest, * WebResourceErrorCompat).

Value: "RECEIVE_WEB_RESOURCE_ERROR"

SAFE_BROWSING_ENABLE

static val SAFE_BROWSING_ENABLE: String

Feature for #isFeatureSupported(String). This feature covers androidx.webkit.WebSettingsCompat#getSafeBrowsingEnabled(WebSettings), and androidx.webkit.WebSettingsCompat#setSafeBrowsingEnabled(WebSettings, boolean).

Value: "SAFE_BROWSING_ENABLE"

SAFE_BROWSING_HIT

static val SAFE_BROWSING_HIT: String

Feature for #isFeatureSupported(String). This feature covers WebViewClientCompat#onSafeBrowsingHit(android.webkit.WebView, * WebResourceRequest, int, SafeBrowsingResponseCompat).

Value: "SAFE_BROWSING_HIT"

SAFE_BROWSING_PRIVACY_POLICY_URL

static val SAFE_BROWSING_PRIVACY_POLICY_URL: String

Feature for #isFeatureSupported(String). This feature covers WebViewCompat#getSafeBrowsingPrivacyPolicyUrl().

Value: "SAFE_BROWSING_PRIVACY_POLICY_URL"

SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY

static val SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY: String

Feature for #isFeatureSupported(String). This feature covers SafeBrowsingResponseCompat#backToSafety(boolean).

Value: "SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY"

SAFE_BROWSING_RESPONSE_PROCEED

static val SAFE_BROWSING_RESPONSE_PROCEED: String

Feature for #isFeatureSupported(String). This feature covers SafeBrowsingResponseCompat#proceed(boolean).

Value: "SAFE_BROWSING_RESPONSE_PROCEED"

SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL

static val SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL: String

Feature for #isFeatureSupported(String). This feature covers SafeBrowsingResponseCompat#showInterstitial(boolean).

Value: "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"

SAFE_BROWSING_WHITELIST

static val SAFE_BROWSING_WHITELIST: String

Feature for #isFeatureSupported(String). This feature covers androidx.webkit.WebViewCompat#setSafeBrowsingWhitelist(List, ValueCallback).

Value: "SAFE_BROWSING_WHITELIST"

SERVICE_WORKER_BASIC_USAGE

static val SERVICE_WORKER_BASIC_USAGE: String

Feature for #isFeatureSupported(String). This feature covers ServiceWorkerControllerCompat#getInstance().

Value: "SERVICE_WORKER_BASIC_USAGE"

SERVICE_WORKER_BLOCK_NETWORK_LOADS

static val SERVICE_WORKER_BLOCK_NETWORK_LOADS: String

Feature for #isFeatureSupported(String). This feature covers ServiceWorkerWebSettingsCompat#getBlockNetworkLoads(), and ServiceWorkerWebSettingsCompat#setBlockNetworkLoads(boolean).

Value: "SERVICE_WORKER_BLOCK_NETWORK_LOADS"

SERVICE_WORKER_CACHE_MODE

static val SERVICE_WORKER_CACHE_MODE: String

Feature for #isFeatureSupported(String). This feature covers ServiceWorkerWebSettingsCompat#getCacheMode(), and ServiceWorkerWebSettingsCompat#setCacheMode(int).

Value: "SERVICE_WORKER_CACHE_MODE"

SERVICE_WORKER_CONTENT_ACCESS

static val SERVICE_WORKER_CONTENT_ACCESS: String

Feature for #isFeatureSupported(String). This feature covers ServiceWorkerWebSettingsCompat#getAllowContentAccess(), and ServiceWorkerWebSettingsCompat#setAllowContentAccess(boolean).

Value: "SERVICE_WORKER_CONTENT_ACCESS"

SERVICE_WORKER_FILE_ACCESS

static val SERVICE_WORKER_FILE_ACCESS: String

Feature for #isFeatureSupported(String). This feature covers ServiceWorkerWebSettingsCompat#getAllowFileAccess(), and ServiceWorkerWebSettingsCompat#setAllowFileAccess(boolean).

Value: "SERVICE_WORKER_FILE_ACCESS"

SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST

static val SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST: String

Feature for #isFeatureSupported(String). This feature covers ServiceWorkerClientCompat#shouldInterceptRequest(WebResourceRequest).

Value: "SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST"

SHOULD_OVERRIDE_WITH_REDIRECTS

static val SHOULD_OVERRIDE_WITH_REDIRECTS: String

Feature for #isFeatureSupported(String). This feature covers WebViewClientCompat#shouldOverrideUrlLoading(android.webkit.WebView, * WebResourceRequest).

Value: "SHOULD_OVERRIDE_WITH_REDIRECTS"

START_SAFE_BROWSING

static val START_SAFE_BROWSING: String

Feature for #isFeatureSupported(String). This feature covers androidx.webkit.WebViewCompat#startSafeBrowsing(Context, ValueCallback).

Value: "START_SAFE_BROWSING"

VISUAL_STATE_CALLBACK

static val VISUAL_STATE_CALLBACK: String

Feature for #isFeatureSupported(String). This feature covers androidx.webkit.WebViewCompat#postVisualStateCallback(android.webkit.WebView, long, * WebViewCompat.VisualStateCallback), and .

Value: "VISUAL_STATE_CALLBACK"

WEB_RESOURCE_ERROR_GET_CODE

static val WEB_RESOURCE_ERROR_GET_CODE: String

Feature for #isFeatureSupported(String). This feature covers WebResourceErrorCompat#getErrorCode().

Value: "WEB_RESOURCE_ERROR_GET_CODE"

WEB_RESOURCE_ERROR_GET_DESCRIPTION

static val WEB_RESOURCE_ERROR_GET_DESCRIPTION: String

Feature for #isFeatureSupported(String). This feature covers WebResourceErrorCompat#getDescription().

Value: "WEB_RESOURCE_ERROR_GET_DESCRIPTION"

WEB_RESOURCE_REQUEST_IS_REDIRECT

static val WEB_RESOURCE_REQUEST_IS_REDIRECT: String

Feature for #isFeatureSupported(String). This feature covers WebResourceRequestCompat#isRedirect(WebResourceRequest).

Value: "WEB_RESOURCE_REQUEST_IS_REDIRECT"

Public methods

isFeatureSupported

open static fun isFeatureSupported(feature: String): Boolean

Return whether a feature is supported at run-time. This depends on the Android version of the device and the WebView APK on the device.