AutofillManager


Autofill API.

This interface is available to all composables via a CompositionLocal. The composable can then notify the Autofill framework that user values have been committed as required.

Summary

Public functions

Unit

Indicate the autofill context should be canceled.

Cmn
Unit

Indicate the autofill session should be committed.

Cmn
Unit

Request autofill for previously focused element.

Cmn

Public functions

cancel

fun cancel(): Unit

Indicate the autofill context should be canceled.

Call this function to notify the Autofill framework that the current session should be canceled. After calling this function, the framework will stop the current autofill session without processing any information entered in the autofillable field.

commit

fun commit(): Unit

Indicate the autofill session should be committed.

Call this function to notify the Autofill framework that the current session should be committed and so the entered credentials might be saved or updated. After calling this function, the framework considers the form submitted, and any relevant dialog will appear to notify the user of the data processed.

requestAutofillForActiveElement

fun requestAutofillForActiveElement(): Unit

Request autofill for previously focused element.

This may have no effect, and it is not required that any autofill service will be notified.

Any component that can be autofilled may call this when it is active to request an autofill services response.