WebViewFeature
public class WebViewFeature
Utility class for checking which WebView Support Library features are supported on the device.
Summary
Constants |
|
|---|---|
static final String |
@Profile.ExperimentalAddQuicHintsFeature for |
static final String |
ALGORITHMIC_DARKENING = "ALGORITHMIC_DARKENING"Feature for |
static final String |
ATTRIBUTION_REGISTRATION_BEHAVIOR = "ATTRIBUTION_REGISTRATION_BEHAVIOR"Feature for |
static final String |
BACK_FORWARD_CACHE = "BACK_FORWARD_CACHE"Feature for |
static final String |
BACK_FORWARD_CACHE_SETTINGS = "BACK_FORWARD_CACHE_SETTINGS"Feature for |
static final String |
BACK_FORWARD_CACHE_SETTINGS_EXPERIMENTAL_V3 = "BACK_FORWARD_CACHE_SETTINGS_EXPERIMENTAL_V3"Feature for |
static final String |
@WebSettingsCompat.ExperimentalBackForwardCacheSettingsFeature for |
static final String |
COOKIE_INTERCEPT = "COOKIE_INTERCEPT"Feature for |
static final String |
CREATE_WEB_MESSAGE_CHANNEL = "CREATE_WEB_MESSAGE_CHANNEL"Feature for |
static final String |
CUSTOM_REQUEST_HEADERS = "CUSTOM_REQUEST_HEADERS"Feature for |
static final String |
DEFAULT_TRAFFICSTATS_TAGGING = "DEFAULT_TRAFFICSTATS_TAGGING"Feature for |
static final String |
DELETE_BROWSING_DATA = "DELETE_BROWSING_DATA"Feature for |
static final String |
DISABLED_ACTION_MODE_MENU_ITEMS = "DISABLED_ACTION_MODE_MENU_ITEMS"Feature for |
static final String |
DOCUMENT_START_SCRIPT = "DOCUMENT_START_SCRIPT"Feature for |
static final String |
DOWNLOAD_FAVICONS_ENABLED = "DOWNLOAD_FAVICONS_ENABLED"Feature for |
static final String |
@Profile.ExperimentalPreconnectFeature for |
static final String |
ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY = "ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY"Feature for |
static final String |
FORCE_DARK = "FORCE_DARK"Feature for |
static final String |
FORCE_DARK_STRATEGY = "FORCE_DARK_STRATEGY"Feature for |
static final String |
GET_COOKIE_INFO = "GET_COOKIE_INFO"Feature for |
static final String |
GET_VARIATIONS_HEADER = "GET_VARIATIONS_HEADER"Feature for |
static final String |
GET_WEB_CHROME_CLIENT = "GET_WEB_CHROME_CLIENT"Feature for |
static final String |
GET_WEB_VIEW_CLIENT = "GET_WEB_VIEW_CLIENT"Feature for |
static final String |
GET_WEB_VIEW_RENDERER = "GET_WEB_VIEW_RENDERER"Feature for |
static final String |
HTTP_CACHE_MANAGER = "HTTP_CACHE_MANAGER"Feature for |
static final String |
HYPERLINK_CONTEXT_MENU_ITEMS = "HYPERLINK_CONTEXT_MENU_ITEMS"This feature covers |
static final String |
JS_INJECTION_IN_FRAME_AND_WORLD = "JS_INJECTION_IN_FRAME_AND_WORLD"Feature for injecting JavaScript into isolated worlds and iFrames. |
static final String |
MULTI_PROCESS = "MULTI_PROCESS"Feature for |
static final String |
MULTI_PROFILE = "MULTI_PROFILE"Feature for |
static final String |
MUTE_AUDIO = "MUTE_AUDIO"Feature for |
static final String |
NAVIGATION_CALLBACK_BASIC = "WEB_VIEW_NAVIGATION_CLIENT_BASIC_USAGE"This field is deprecated. Use |
static final String |
NAVIGATION_GET_WEB_RESOURCE_ERROR = "NAVIGATION_GET_WEB_RESOURCE_ERROR"Feature for |
static final String |
NAVIGATION_LISTENER = "NAVIGATION_LISTENER"Feature for |
static final String |
NAVIGATION_LISTENER_NON_NULL_PAGE_FOR_SAME_DOCUMENT_NAVIGATIONS = "NAVIGATION_LISTENER_NON_NULL_PAGE_FOR_SAME_DOCUMENT_NAVIGATIONS"This field is deprecated. Use |
static final String |
NAVIGATION_LISTENER_ON_COMPLETED_FIRES_FOR_NON_COMMITTED = "NAVIGATION_LISTENER_ON_COMPLETED_FIRES_FOR_NON_COMMITTED"This field is deprecated. Use |
static final String |
NAVIGATION_LISTENER_V1 = "NAVIGATION_LISTENER_V1"This field is deprecated. Use |
static final String |
NAVIGATION_LISTENER_V2 = "NAVIGATION_LISTENER_V2"This field is deprecated. Use |
static final String |
OFF_SCREEN_PRERASTER = "OFF_SCREEN_PRERASTER"Feature for |
static final String |
PAGE_GET_URL = "PAGE_GET_URL"This field is deprecated. Use |
static final String |
PAYMENT_REQUEST = "PAYMENT_REQUEST"Feature for |
static final String |
POST_WEB_MESSAGE = "POST_WEB_MESSAGE"Feature for |
static final String |
@Profile.ExperimentalPreconnectFeature for |
static final String |
PRERENDER_WITH_URL = "PRERENDER_URL_V2"Feature for |
static final String |
@Profile.ExperimentalUrlPrefetchFeature for |
static final String |
PROXY_OVERRIDE = "PROXY_OVERRIDE"Feature for |
static final String |
PROXY_OVERRIDE_REVERSE_BYPASS = "PROXY_OVERRIDE_REVERSE_BYPASS"Feature for |
static final String |
RECEIVE_HTTP_ERROR = "RECEIVE_HTTP_ERROR"Feature for |
static final String |
RECEIVE_WEB_RESOURCE_ERROR = "RECEIVE_WEB_RESOURCE_ERROR"Feature for |
static final String |
SAFE_BROWSING_ALLOWLIST = "SAFE_BROWSING_ALLOWLIST"Feature for |
static final String |
SAFE_BROWSING_ENABLE = "SAFE_BROWSING_ENABLE"Feature for |
static final String |
SAFE_BROWSING_HIT = "SAFE_BROWSING_HIT"Feature for |
static final String |
SAFE_BROWSING_PRIVACY_POLICY_URL = "SAFE_BROWSING_PRIVACY_POLICY_URL"Feature for |
static final String |
SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY = "SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY"Feature for |
static final String |
SAFE_BROWSING_RESPONSE_PROCEED = "SAFE_BROWSING_RESPONSE_PROCEED"Feature for |
static final String |
SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL = "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"Feature for |
static final String |
SAFE_BROWSING_WHITELIST = "SAFE_BROWSING_WHITELIST"This field is deprecated. Please use |
static final String |
SAVE_STATE = "SAVE_STATE"Feature for |
static final String |
SERVICE_WORKER_BASIC_USAGE = "SERVICE_WORKER_BASIC_USAGE"Feature for |
static final String |
SERVICE_WORKER_BLOCK_NETWORK_LOADS = "SERVICE_WORKER_BLOCK_NETWORK_LOADS"Feature for |
static final String |
SERVICE_WORKER_CACHE_MODE = "SERVICE_WORKER_CACHE_MODE"Feature for |
static final String |
SERVICE_WORKER_CONTENT_ACCESS = "SERVICE_WORKER_CONTENT_ACCESS"Feature for |
static final String |
SERVICE_WORKER_FILE_ACCESS = "SERVICE_WORKER_FILE_ACCESS"Feature for |
static final String |
SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST = "SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST"Feature for |
static final String |
SHOULD_OVERRIDE_WITH_REDIRECTS = "SHOULD_OVERRIDE_WITH_REDIRECTS"Feature for |
static final String |
SPECULATIVE_LOADING = "SPECULATIVE_LOADING_STATUS"Feature for |
static final String |
@Profile.ExperimentalUrlPrefetchFeature for |
static final String |
STARTUP_FEATURE_CONFIGURE_PARTITIONED_COOKIES = "STARTUP_FEATURE_CONFIGURE_PARTITIONED_COOKIES"Feature for |
static final String |
STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX = "STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX"Feature for |
static final String |
STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS = "STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS"Feature for |
static final String |
STARTUP_FEATURE_SET_PROFILES_TO_LOAD = "STARTUP_FEATURE_SET_PROFILES_TO_LOAD"Feature for |
static final String |
@WebViewCompat.ExperimentalAsyncStartUpThis field is deprecated. Use |
static final String |
@WebViewCompat.ExperimentalAsyncStartUpFeature for |
static final String |
START_SAFE_BROWSING = "START_SAFE_BROWSING"Feature for |
static final String |
TRACING_CONTROLLER_BASIC_USAGE = "TRACING_CONTROLLER_BASIC_USAGE"Feature for |
static final String |
USER_AGENT_METADATA = "USER_AGENT_METADATA"Feature for |
static final String |
USER_AGENT_METADATA_FORM_FACTORS = "USER_AGENT_METADATA_FORM_FACTORS"Feature for |
static final String |
VISUAL_STATE_CALLBACK = "VISUAL_STATE_CALLBACK"Feature for |
static final String |
@Profile.ExperimentalWarmUpRendererProcessFeature for |
static final String |
@WebViewBuilder.ExperimentalFeature for |
static final String |
@WebViewBuilder.ExperimentalFeature for |
static final String |
WEBVIEW_MEDIA_INTEGRITY_API_STATUS = "WEBVIEW_MEDIA_INTEGRITY_API_STATUS"Feature for |
static final String |
@WebViewCompat.ExperimentalNavigateThis feature covers |
static final String |
WEB_AUTHENTICATION = "WEB_AUTHENTICATION"Feature for |
static final String |
WEB_MESSAGE_ARRAY_BUFFER = "WEB_MESSAGE_ARRAY_BUFFER"Feature for |
static final String |
WEB_MESSAGE_CALLBACK_ON_MESSAGE = "WEB_MESSAGE_CALLBACK_ON_MESSAGE"Feature for |
static final String |
WEB_MESSAGE_LISTENER = "WEB_MESSAGE_LISTENER"Feature for |
static final String |
WEB_MESSAGE_PORT_CLOSE = "WEB_MESSAGE_PORT_CLOSE"Feature for |
static final String |
WEB_MESSAGE_PORT_POST_MESSAGE = "WEB_MESSAGE_PORT_POST_MESSAGE"Feature for |
static final String |
WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK = "WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK"Feature for |
static final String |
WEB_RESOURCE_ERROR_GET_CODE = "WEB_RESOURCE_ERROR_GET_CODE"Feature for |
static final String |
WEB_RESOURCE_ERROR_GET_DESCRIPTION = "WEB_RESOURCE_ERROR_GET_DESCRIPTION"Feature for |
static final String |
WEB_RESOURCE_REQUEST_IS_REDIRECT = "WEB_RESOURCE_REQUEST_IS_REDIRECT"Feature for |
static final String |
WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE = "WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE"Feature for |
static final String |
WEB_VIEW_RENDERER_TERMINATE = "WEB_VIEW_RENDERER_TERMINATE"Feature for |
Public methods |
|
|---|---|
static boolean |
isFeatureSupported(@NonNull String feature)Return whether a feature is supported at run-time. |
static boolean |
isStartupFeatureSupported(Return whether a startup feature is supported at run-time. |
Constants
ADD_QUIC_HINTS_V1
@Profile.ExperimentalAddQuicHints
public static final String ADD_QUIC_HINTS_V1 = "ADD_QUIC_HINTS"
Feature for addQuicHints.
ALGORITHMIC_DARKENING
public static final String ALGORITHMIC_DARKENING = "ALGORITHMIC_DARKENING"
Feature for isFeatureSupported. This feature covers setAlgorithmicDarkeningAllowed and isAlgorithmicDarkeningAllowed.
ATTRIBUTION_REGISTRATION_BEHAVIOR
public static final String ATTRIBUTION_REGISTRATION_BEHAVIOR = "ATTRIBUTION_REGISTRATION_BEHAVIOR"
Feature for isFeatureSupported. This feature covers setAttributionRegistrationBehaviorgetAttributionRegistrationBehavior
BACK_FORWARD_CACHE
public static final String BACK_FORWARD_CACHE = "BACK_FORWARD_CACHE"
Feature for isFeatureSupported. This feature covers setBackForwardCacheEnabledgetBackForwardCacheEnabled
BACK_FORWARD_CACHE_SETTINGS
public static final String BACK_FORWARD_CACHE_SETTINGS = "BACK_FORWARD_CACHE_SETTINGS"
Feature for isFeatureSupported. This feature covers setBackForwardCacheSettingsgetBackForwardCacheSettings
BACK_FORWARD_CACHE_SETTINGS_EXPERIMENTAL_V3
public static final String BACK_FORWARD_CACHE_SETTINGS_EXPERIMENTAL_V3 = "BACK_FORWARD_CACHE_SETTINGS_EXPERIMENTAL_V3"
Feature for isFeatureSupported. This feature covers setMaxPagesInCachesetTimeoutSeconds
BACK_FORWARD_CACHE_SETTINGS_EXPERIMENTAL_V4
@WebSettingsCompat.ExperimentalBackForwardCacheSettings
public static final String BACK_FORWARD_CACHE_SETTINGS_EXPERIMENTAL_V4 = "BACK_FORWARD_CACHE_SETTINGS_EXPERIMENTAL_V4"
Feature for isFeatureSupported. This feature covers setKeepForwardEntriesEnabledisKeepForwardEntriesEnabled
COOKIE_INTERCEPT
public static final String COOKIE_INTERCEPT = "COOKIE_INTERCEPT"
Feature for isFeatureSupported. This feature covers setCookies, as well as setCookiesIncludedInShouldInterceptRequest and setIncludeCookiesOnShouldInterceptRequestEnabled.
CREATE_WEB_MESSAGE_CHANNEL
public static final String CREATE_WEB_MESSAGE_CHANNEL = "CREATE_WEB_MESSAGE_CHANNEL"
Feature for isFeatureSupported. This feature covers createWebMessageChannel.
CUSTOM_REQUEST_HEADERS
public static final String CUSTOM_REQUEST_HEADERS = "CUSTOM_REQUEST_HEADERS"
Feature for isFeatureSupported.
This feature covers addCustomHeader, hasCustomHeader, getCustomHeaders, getCustomHeaders, getCustomHeaders, clearCustomHeader, clearCustomHeader, and clearAllCustomHeaders.
DEFAULT_TRAFFICSTATS_TAGGING
public static final String DEFAULT_TRAFFICSTATS_TAGGING = "DEFAULT_TRAFFICSTATS_TAGGING"
Feature for isFeatureSupported. This feature covers setDefaultTrafficStatsTag}
DELETE_BROWSING_DATA
public static final String DELETE_BROWSING_DATA = "DELETE_BROWSING_DATA"
Feature for isFeatureSupported. This feature covers deleteBrowsingData, deleteBrowsingData, deleteBrowsingDataForSite, deleteBrowsingDataForSite
DISABLED_ACTION_MODE_MENU_ITEMS
public static final String DISABLED_ACTION_MODE_MENU_ITEMS = "DISABLED_ACTION_MODE_MENU_ITEMS"
Feature for isFeatureSupported. This feature covers getDisabledActionModeMenuItems, and setDisabledActionModeMenuItems.
DOCUMENT_START_SCRIPT
public static final String DOCUMENT_START_SCRIPT = "DOCUMENT_START_SCRIPT"
Feature for isFeatureSupported. This feature covers addDocumentStartJavaScript.
DOWNLOAD_FAVICONS_ENABLED
public static final String DOWNLOAD_FAVICONS_ENABLED = "DOWNLOAD_FAVICONS_ENABLED"
Feature for setDownloadFaviconsEnabled, getDownloadFaviconsEnabled
ENQUEUE_PRECONNECT
@Profile.ExperimentalPreconnect
public static final String ENQUEUE_PRECONNECT = "ENQUEUE_PRECONNECT"
Feature for isFeatureSupported. This feature covers enqueuePreconnect
ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY
public static final String ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY = "ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY"
Feature for isFeatureSupported. This feature covers setEnterpriseAuthenticationAppLinkPolicyEnabledand getEnterpriseAuthenticationAppLinkPolicyEnabled.
FORCE_DARK
public static final String FORCE_DARK = "FORCE_DARK"
Feature for isFeatureSupported. This feature covers setForceDark and getForceDark.
FORCE_DARK_STRATEGY
public static final String FORCE_DARK_STRATEGY = "FORCE_DARK_STRATEGY"
Feature for isFeatureSupported. This feature covers setForceDarkStrategy and getForceDarkStrategy.
GET_COOKIE_INFO
public static final String GET_COOKIE_INFO = "GET_COOKIE_INFO"
Feature for isFeatureSupported. This feature covers getCookieInfo.
GET_VARIATIONS_HEADER
public static final String GET_VARIATIONS_HEADER = "GET_VARIATIONS_HEADER"
Feature for isFeatureSupported. This feature covers getVariationsHeader.
GET_WEB_CHROME_CLIENT
public static final String GET_WEB_CHROME_CLIENT = "GET_WEB_CHROME_CLIENT"
Feature for isFeatureSupported. This feature covers getWebChromeClient
GET_WEB_VIEW_CLIENT
public static final String GET_WEB_VIEW_CLIENT = "GET_WEB_VIEW_CLIENT"
Feature for isFeatureSupported. This feature covers getWebViewClient
GET_WEB_VIEW_RENDERER
public static final String GET_WEB_VIEW_RENDERER = "GET_WEB_VIEW_RENDERER"
Feature for isFeatureSupported. This feature covers getWebViewRenderProcess
HTTP_CACHE_MANAGER
public static final String HTTP_CACHE_MANAGER = "HTTP_CACHE_MANAGER"
Feature for isFeatureSupported. This feature covers getHttpCachegetDefaultQuotaBytesisUsingDefaultQuotauseDefaultQuotagetQuotaBytessetQuotaBytes
HYPERLINK_CONTEXT_MENU_ITEMS
public static final String HYPERLINK_CONTEXT_MENU_ITEMS = "HYPERLINK_CONTEXT_MENU_ITEMS"
This feature covers setHyperlinkContextMenuItems,
JS_INJECTION_IN_FRAME_AND_WORLD
public static final String JS_INJECTION_IN_FRAME_AND_WORLD = "JS_INJECTION_IN_FRAME_AND_WORLD"
Feature for injecting JavaScript into isolated worlds and iFrames. This feature covers: addJavaScriptOnEvent, addWebMessageListener, removeWebMessageListenergetExecutionWorld, and executeJavaScript.
MULTI_PROCESS
public static final String MULTI_PROCESS = "MULTI_PROCESS"
Feature for isFeatureSupported. This feature covers isMultiProcessEnabled
MULTI_PROFILE
public static final String MULTI_PROFILE = "MULTI_PROFILE"
Feature for isFeatureSupported. This feature covers getName. getWebStorage. getCookieManager. getGeolocationPermissions. getServiceWorkerController. getProfile. getOrCreateProfile. getAllProfileNames. deleteProfile. getInstance.
MUTE_AUDIO
public static final String MUTE_AUDIO = "MUTE_AUDIO"
Feature for isFeatureSupported. This feature covers isAudioMutedsetAudioMuted
NAVIGATION_GET_WEB_RESOURCE_ERROR
public static final String NAVIGATION_GET_WEB_RESOURCE_ERROR = "NAVIGATION_GET_WEB_RESOURCE_ERROR"
Feature for isFeatureSupported. This feature covers getWebResourceErrorgetDebugCode.
NAVIGATION_LISTENER
public static final String NAVIGATION_LISTENER = "NAVIGATION_LISTENER"
Feature for isFeatureSupported. This feature covers onNavigationStarted, onNavigationRedirected, onNavigationCompleted, onPageDeleted, onPageLoadEvent, onPageDomContentLoadedEvent, onFirstContentfulPaintMillis, onLargestContentfulPaintMillis, onPerformanceMarkMillis, getPage, getUrl, wasInitiatedByPage, isSameDocument, isReload, isHistory, isBack, isForward, didCommit, didCommitErrorPage, getStatusCode, isRestore, getUrl
NAVIGATION_LISTENER_NON_NULL_PAGE_FOR_SAME_DOCUMENT_NAVIGATIONS
public static final String NAVIGATION_LISTENER_NON_NULL_PAGE_FOR_SAME_DOCUMENT_NAVIGATIONS = "NAVIGATION_LISTENER_NON_NULL_PAGE_FOR_SAME_DOCUMENT_NAVIGATIONS"
public static final String NAVIGATION_LISTENER_ON_COMPLETED_FIRES_FOR_NON_COMMITTED = "NAVIGATION_LISTENER_ON_COMPLETED_FIRES_FOR_NON_COMMITTED"
OFF_SCREEN_PRERASTER
public static final String OFF_SCREEN_PRERASTER = "OFF_SCREEN_PRERASTER"
Feature for isFeatureSupported. This feature covers getOffscreenPreRaster, and setOffscreenPreRaster.
PAYMENT_REQUEST
public static final String PAYMENT_REQUEST = "PAYMENT_REQUEST"
Feature for isFeatureSupported. This feature covers setPaymentRequestEnabled, getPaymentRequestEnabled, setHasEnrolledInstrumentEnabled, and getHasEnrolledInstrumentEnabled,
POST_WEB_MESSAGE
public static final String POST_WEB_MESSAGE = "POST_WEB_MESSAGE"
Feature for isFeatureSupported. This feature covers postWebMessage.
PRECONNECT
@Profile.ExperimentalPreconnect
public static final String PRECONNECT = "PRECONNECT"
Feature for isFeatureSupported. This feature covers preconnect
PRERENDER_WITH_URL
public static final String PRERENDER_WITH_URL = "PRERENDER_URL_V2"
Feature for isFeatureSupported. This feature covers prerenderUrlAsync
PROFILE_URL_PREFETCH
@Profile.ExperimentalUrlPrefetch
public static final String PROFILE_URL_PREFETCH = "PREFETCH_URL_V5"
Feature for isFeatureSupported. This feature covers prefetchUrlAsyncprefetchUrlAsync
PROXY_OVERRIDE
public static final String PROXY_OVERRIDE = "PROXY_OVERRIDE"
Feature for isFeatureSupported. This feature covers setProxyOverride, clearProxyOverride, and
PROXY_OVERRIDE_REVERSE_BYPASS
public static final String PROXY_OVERRIDE_REVERSE_BYPASS = "PROXY_OVERRIDE_REVERSE_BYPASS"
Feature for isFeatureSupported. This feature covers setReverseBypassEnabled
RECEIVE_HTTP_ERROR
public static final String RECEIVE_HTTP_ERROR = "RECEIVE_HTTP_ERROR"
Feature for isFeatureSupported. This feature covers onReceivedHttpError.
RECEIVE_WEB_RESOURCE_ERROR
public static final String RECEIVE_WEB_RESOURCE_ERROR = "RECEIVE_WEB_RESOURCE_ERROR"
Feature for isFeatureSupported. This feature covers onReceivedError.
SAFE_BROWSING_ALLOWLIST
public static final String SAFE_BROWSING_ALLOWLIST = "SAFE_BROWSING_ALLOWLIST"
Feature for isFeatureSupported. This feature covers setSafeBrowsingAllowlist.
SAFE_BROWSING_ENABLE
public static final String SAFE_BROWSING_ENABLE = "SAFE_BROWSING_ENABLE"
Feature for isFeatureSupported. This feature covers getSafeBrowsingEnabled, and setSafeBrowsingEnabled.
SAFE_BROWSING_HIT
public static final String SAFE_BROWSING_HIT = "SAFE_BROWSING_HIT"
Feature for isFeatureSupported. This feature covers onSafeBrowsingHit.
SAFE_BROWSING_PRIVACY_POLICY_URL
public static final String SAFE_BROWSING_PRIVACY_POLICY_URL = "SAFE_BROWSING_PRIVACY_POLICY_URL"
Feature for isFeatureSupported. This feature covers getSafeBrowsingPrivacyPolicyUrl.
SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY
public static final String SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY = "SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY"
Feature for isFeatureSupported. This feature covers backToSafety.
SAFE_BROWSING_RESPONSE_PROCEED
public static final String SAFE_BROWSING_RESPONSE_PROCEED = "SAFE_BROWSING_RESPONSE_PROCEED"
Feature for isFeatureSupported. This feature covers proceed.
SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL
public static final String SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL = "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"
Feature for isFeatureSupported. This feature covers showInterstitial.
public static final String SAFE_BROWSING_WHITELIST = "SAFE_BROWSING_WHITELIST"
Feature for isFeatureSupported. This feature covers setSafeBrowsingWhitelist.
This is functionally equivalent to SAFE_BROWSING_ALLOWLIST: both constants represent the same range of compatibility across Android OS versions and WebView versions.
SAVE_STATE
public static final String SAVE_STATE = "SAVE_STATE"
Feature for isFeatureSupported. This feature covers saveState.
SERVICE_WORKER_BASIC_USAGE
public static final String SERVICE_WORKER_BASIC_USAGE = "SERVICE_WORKER_BASIC_USAGE"
Feature for isFeatureSupported. This feature covers getInstance.
SERVICE_WORKER_BLOCK_NETWORK_LOADS
public static final String SERVICE_WORKER_BLOCK_NETWORK_LOADS = "SERVICE_WORKER_BLOCK_NETWORK_LOADS"
Feature for isFeatureSupported. This feature covers getBlockNetworkLoads, and setBlockNetworkLoads.
SERVICE_WORKER_CACHE_MODE
public static final String SERVICE_WORKER_CACHE_MODE = "SERVICE_WORKER_CACHE_MODE"
Feature for isFeatureSupported. This feature covers getCacheMode, and setCacheMode.
SERVICE_WORKER_CONTENT_ACCESS
public static final String SERVICE_WORKER_CONTENT_ACCESS = "SERVICE_WORKER_CONTENT_ACCESS"
Feature for isFeatureSupported. This feature covers getAllowContentAccess, and setAllowContentAccess.
SERVICE_WORKER_FILE_ACCESS
public static final String SERVICE_WORKER_FILE_ACCESS = "SERVICE_WORKER_FILE_ACCESS"
Feature for isFeatureSupported. This feature covers getAllowFileAccess, and setAllowFileAccess.
SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST
public static final String SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST = "SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST"
Feature for isFeatureSupported. This feature covers shouldInterceptRequest.
SHOULD_OVERRIDE_WITH_REDIRECTS
public static final String SHOULD_OVERRIDE_WITH_REDIRECTS = "SHOULD_OVERRIDE_WITH_REDIRECTS"
Feature for isFeatureSupported. This feature covers shouldOverrideUrlLoading.
SPECULATIVE_LOADING
public static final String SPECULATIVE_LOADING = "SPECULATIVE_LOADING_STATUS"
Feature for isFeatureSupported. This feature covers setSpeculativeLoadingStatusgetSpeculativeLoadingStatus}
SPECULATIVE_LOADING_CONFIG
@Profile.ExperimentalUrlPrefetch
public static final String SPECULATIVE_LOADING_CONFIG = "SPECULATIVE_LOADING_CONFIG_V2"
Feature for isFeatureSupported. This feature covers setSpeculativeLoadingConfig
STARTUP_FEATURE_CONFIGURE_PARTITIONED_COOKIES
public static final String STARTUP_FEATURE_CONFIGURE_PARTITIONED_COOKIES = "STARTUP_FEATURE_CONFIGURE_PARTITIONED_COOKIES"
Feature for isStartupFeatureSupported. This feature covers setPartitionedCookiesEnabled
STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX
public static final String STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX = "STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX"
Feature for isStartupFeatureSupported. This feature covers setDataDirectorySuffix.
STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS
public static final String STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS = "STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS"
Feature for isStartupFeatureSupported. This feature covers setDirectoryBasePaths
STARTUP_FEATURE_SET_PROFILES_TO_LOAD
public static final String STARTUP_FEATURE_SET_PROFILES_TO_LOAD = "STARTUP_FEATURE_SET_PROFILES_TO_LOAD"
Feature for isFeatureSupported. This feature covers setProfilesToLoadDuringStartup.
@WebViewCompat.ExperimentalAsyncStartUp
public static final String STARTUP_FEATURE_SET_UI_THREAD_STARTUP_MODE = "STARTUP_FEATURE_SET_UI_THREAD_STARTUP_MODE"
Feature for isStartupFeatureSupported. This feature covers setUiThreadStartupMode.
STARTUP_FEATURE_SET_UI_THREAD_STARTUP_MODE_V2
@WebViewCompat.ExperimentalAsyncStartUp
public static final String STARTUP_FEATURE_SET_UI_THREAD_STARTUP_MODE_V2 = "STARTUP_FEATURE_SET_UI_THREAD_STARTUP_MODE_V2"
Feature for isStartupFeatureSupported. This feature covers setUiThreadStartupMode.
START_SAFE_BROWSING
public static final String START_SAFE_BROWSING = "START_SAFE_BROWSING"
Feature for isFeatureSupported. This feature covers startSafeBrowsing.
TRACING_CONTROLLER_BASIC_USAGE
public static final String TRACING_CONTROLLER_BASIC_USAGE = "TRACING_CONTROLLER_BASIC_USAGE"
Feature for isFeatureSupported. This feature covers getInstance, isTracing, start, stop.
USER_AGENT_METADATA
public static final String USER_AGENT_METADATA = "USER_AGENT_METADATA"
Feature for isFeatureSupported. This feature covers getUserAgentMetadata, and setUserAgentMetadata.
USER_AGENT_METADATA_FORM_FACTORS
public static final String USER_AGENT_METADATA_FORM_FACTORS = "USER_AGENT_METADATA_FORM_FACTORS"
Feature for isFeatureSupported. This feature covers setFormFactors, and getFormFactors.
VISUAL_STATE_CALLBACK
public static final String VISUAL_STATE_CALLBACK = "VISUAL_STATE_CALLBACK"
Feature for isFeatureSupported. This feature covers postVisualStateCallback, and onPageCommitVisible.
WARM_UP_RENDERER_PROCESS
@Profile.ExperimentalWarmUpRendererProcess
public static final String WARM_UP_RENDERER_PROCESS = "WARM_UP_RENDERER_PROCESS"
Feature for isFeatureSupported. This feature covers warmUpRendererProcess.
WEBVIEW_BUILDER_EXPERIMENTAL_V1
@WebViewBuilder.Experimental
public static final String WEBVIEW_BUILDER_EXPERIMENTAL_V1 = "WEBVIEW_BUILDER_EXPERIMENTAL_V1"
Feature for isFeatureSupported. This feature covers: build.
WEBVIEW_BUILDER_EXPERIMENTAL_V2
@WebViewBuilder.Experimental
public static final String WEBVIEW_BUILDER_EXPERIMENTAL_V2 = "WEBVIEW_BUILDER_EXPERIMENTAL_V2"
Feature for isFeatureSupported. This feature covers: applyTo.
WEBVIEW_MEDIA_INTEGRITY_API_STATUS
public static final String WEBVIEW_MEDIA_INTEGRITY_API_STATUS = "WEBVIEW_MEDIA_INTEGRITY_API_STATUS"
Feature for isFeatureSupported. This feature covers setWebViewMediaIntegrityApiStatusgetWebViewMediaIntegrityApiStatus
WEBVIEW_NAVIGATE_EXPERIMENTAL_V1
@WebViewCompat.ExperimentalNavigate
public static final String WEBVIEW_NAVIGATE_EXPERIMENTAL_V1 = "WEBVIEW_NAVIGATE_EXPERIMENTAL_V1"
This feature covers navigate.
WEB_AUTHENTICATION
public static final String WEB_AUTHENTICATION = "WEB_AUTHENTICATION"
Feature for isFeatureSupported This feature covers setWebAuthenticationSupportgetWebAuthenticationSupport
WEB_MESSAGE_ARRAY_BUFFER
public static final String WEB_MESSAGE_ARRAY_BUFFER = "WEB_MESSAGE_ARRAY_BUFFER"
Feature for isFeatureSupported. This feature covers postMessage with ArrayBuffer type, postWebMessage with ArrayBuffer type, and postMessage.
WEB_MESSAGE_CALLBACK_ON_MESSAGE
public static final String WEB_MESSAGE_CALLBACK_ON_MESSAGE = "WEB_MESSAGE_CALLBACK_ON_MESSAGE"
Feature for isFeatureSupported. This feature covers onMessage.
WEB_MESSAGE_LISTENER
public static final String WEB_MESSAGE_LISTENER = "WEB_MESSAGE_LISTENER"
Feature for isFeatureSupported. This feature covers addWebMessageListener and removeWebMessageListener.
WEB_MESSAGE_PORT_CLOSE
public static final String WEB_MESSAGE_PORT_CLOSE = "WEB_MESSAGE_PORT_CLOSE"
Feature for isFeatureSupported. This feature covers close.
WEB_MESSAGE_PORT_POST_MESSAGE
public static final String WEB_MESSAGE_PORT_POST_MESSAGE = "WEB_MESSAGE_PORT_POST_MESSAGE"
Feature for isFeatureSupported. This feature covers postMessage.
WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK
public static final String WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK = "WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK"
Feature for isFeatureSupported. This feature covers setWebMessageCallback, and setWebMessageCallback.
WEB_RESOURCE_ERROR_GET_CODE
public static final String WEB_RESOURCE_ERROR_GET_CODE = "WEB_RESOURCE_ERROR_GET_CODE"
Feature for isFeatureSupported. This feature covers getErrorCode.
WEB_RESOURCE_ERROR_GET_DESCRIPTION
public static final String WEB_RESOURCE_ERROR_GET_DESCRIPTION = "WEB_RESOURCE_ERROR_GET_DESCRIPTION"
Feature for isFeatureSupported. This feature covers getDescription.
WEB_RESOURCE_REQUEST_IS_REDIRECT
public static final String WEB_RESOURCE_REQUEST_IS_REDIRECT = "WEB_RESOURCE_REQUEST_IS_REDIRECT"
Feature for isFeatureSupported. This feature covers isRedirect.
WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE
public static final String WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE = "WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE"
Feature for isFeatureSupported. This feature covers getWebViewRenderProcessClient, setWebViewRenderProcessClient,
WEB_VIEW_RENDERER_TERMINATE
public static final String WEB_VIEW_RENDERER_TERMINATE = "WEB_VIEW_RENDERER_TERMINATE"
Feature for isFeatureSupported. This feature covers terminate
Public methods
isFeatureSupported
public static boolean isFeatureSupported(@NonNull String feature)
Return whether a feature is supported at run-time. This will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device, and the WebView APK on the device.
Note: This method is different from isStartupFeatureSupported and this method only accepts certain features. Please verify that the correct feature checking method is used for a particular feature.
Note: If this method returns false, it is not safe to invoke the methods requiring the desired feature. Furthermore, if this method returns false for a particular feature, any callback guarded by that feature will not be invoked.
| Returns | |
|---|---|
boolean |
whether the feature is supported given the current platform SDK and WebView version |
isStartupFeatureSupported
public static boolean isStartupFeatureSupported(
@NonNull Context context,
@NonNull String startupFeature
)
Return whether a startup feature is supported at run-time. This will check whether a startup feature is supported, depending on the combination of the desired feature, the Android version of device, and the WebView APK on the device.
Note: This method is different from isFeatureSupported and this method only accepts startup features. Please verify that the correct feature checking method is used for a particular feature.
Note: If this method returns false, it is not safe to invoke the methods requiring the desired feature. Furthermore, if this method returns false for a particular feature, any callback guarded by that feature will not be invoked.
| Parameters | |
|---|---|
@NonNull Context context |
a Context to access application assets This value cannot be null. |
@NonNull String startupFeature |
the startup feature to be checked |
| Returns | |
|---|---|
boolean |
whether the feature is supported given the current platform SDK and WebView version |