Added in API level 31

SavedDatasetsInfoCallback


interface SavedDatasetsInfoCallback
android.service.autofill.SavedDatasetsInfoCallback

Handles the response to AutofillService.onSavedDatasetsInfoRequest(SavedDatasetsInfoCallback).

Use onSuccess(java.util.Set) to return the computed info about the datasets the user saved to this service. If there was an error querying the info, or if the service is unable to do so at this time (for example, if the user isn't logged in), call onError(int).

This callback can be used only once.

Summary

Constants
static Int

The result cannot be computed until the user takes some action, such as setting up their account.

static Int

The result could not be computed for any other reason.

static Int

The service does not support this request.

Public methods
abstract Unit
onError(error: Int)

Respond to the request with an error.

abstract Unit

Successfully respond to the request with the info on each type of saved datasets.

Constants

ERROR_NEEDS_USER_ACTION

Added in API level 31
static val ERROR_NEEDS_USER_ACTION: Int

The result cannot be computed until the user takes some action, such as setting up their account.

Value: 2

ERROR_OTHER

Added in API level 31
static val ERROR_OTHER: Int

The result could not be computed for any other reason.

Value: 0

ERROR_UNSUPPORTED

Added in API level 31
static val ERROR_UNSUPPORTED: Int

The service does not support this request.

Value: 1

Public methods

onError

Added in API level 31
abstract fun onError(error: Int): Unit

Respond to the request with an error. System settings may display a suitable notice to the user.

Parameters
error Int: Value is android.service.autofill.SavedDatasetsInfoCallback#ERROR_OTHER, android.service.autofill.SavedDatasetsInfoCallback#ERROR_UNSUPPORTED, or android.service.autofill.SavedDatasetsInfoCallback#ERROR_NEEDS_USER_ACTION

onSuccess

Added in API level 31
abstract fun onSuccess(results: MutableSet<SavedDatasetsInfo!>): Unit

Successfully respond to the request with the info on each type of saved datasets.

Parameters
results MutableSet<SavedDatasetsInfo!>: This value cannot be null.