BrowserAutofill

interface BrowserAutofill

Public interface for accessing and configuring browser autofill functionality for a WebView instance

Types

Link copied to clipboard
interface Configurator

Functions

Link copied to clipboard

Informs the JS layer to use the generated password and fill it into the password field(s)

Link copied to clipboard
abstract fun addJsInterface(webView: WebView, autofillCallback: Callback, emailProtectionInContextCallback: EmailProtectionUserPromptListener? = null, emailProtectionInContextSignupFlowCallback: EmailProtectionInContextSignupFlowListener? = null, tabId: String)

Adds the native->JS interface to the given WebView This should be called once per WebView where autofill is to be available in it

Cancels any ongoing autofill operations which would show the user the prompt to choose credentials This would only normally be needed if a user-interaction happened such that showing autofill prompt would be undesirable.

Link copied to clipboard

Informs the JS layer that the in-context Email Protection flow has finished

Link copied to clipboard
abstract fun injectCredentials(credentials: LoginCredentials?)

Communicates with the JS layer to pass the given credentials

Link copied to clipboard

Informs the JS layer not to use the generated password

Link copied to clipboard
abstract fun removeJsInterface()

Removes the JS interface as a clean-up. Recommended to call from onDestroy() of Fragment/Activity containing the WebView