Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in API level 26

FillCallback

public final class FillCallback
extends Object

java.lang.Object
   ↳ android.service.autofill.FillCallback


FillCallback handles autofill requests from the AutofillService into the Activity being autofilled.

To learn about using Autofill services in your app, read Build autofill services.

Summary

Public methods

void onFailure(CharSequence message)

Notifies the Android System that an AutofillService.onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback) could not be fulfilled by the service.

void onSuccess(FillResponse response)

Notifies the Android System that an AutofillService.onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback) was successfully fulfilled by the service.

Inherited methods

Public methods

onFailure

added in API level 26
public void onFailure (CharSequence message)

Notifies the Android System that an AutofillService.onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback) could not be fulfilled by the service.

Parameters
message CharSequence: error message to be displayed to the user.

This value may be null.

onSuccess

added in API level 26
public void onSuccess (FillResponse response)

Notifies the Android System that an AutofillService.onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback) was successfully fulfilled by the service.

Parameters
response FillResponse: autofill information for that activity, or null when the activity cannot be autofilled (for example, if it only contains read-only fields). See FillResponse for examples.