# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods | Inherited Methods

# 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 a fill request ( `AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)`) could not be fulfilled by the service (for example, because the user data was not available yet), so the request could be retried later.
`void` | `onSuccess(FillResponse response)` Notifies the Android System that a fill request (`AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)`) was successfully fulfilled by the service.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public methods

### onFailure

    public void onFailure (CharSequence message)

Notifies the Android System that a fill request ( `AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)`) could not be fulfilled by the service (for example, because the user data was not available yet), so the request could be retried later.

Note: this method should not be used when the service didn't have the heursitics to fulfill the request; in this case, the service should call `onSuccess(null)` instead.

Note: prior to `Build.VERSION_CODES.Q`, this method was not working as intended and the service should always call `onSuccess(null)` instead.

Note: for apps targeting `Build.VERSION_CODES.Q` or higher, this method just logs the message on `logcat`; for apps targetting older SDKs, it also displays the message to user using a `Toast`. Generally speaking, you should not display an error to the user if the request failed, unless the request had the `FillRequest#FLAG_MANUAL_REQUEST` flag.

Parameters
`message` | `CharSequence`: error message. Note: this message should not contain PII (Personally Identifiable Information, such as username or email address). This value may be `null`.

Throws
`IllegalStateException` | if this method or `onSuccess(android.service.autofill.FillResponse)` was already called.

### onSuccess

    public void onSuccess (FillResponse response)

Notifies the Android System that a fill request (`AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)`) was successfully fulfilled by the service.

This method should always be called, even if the service doesn't have the heuristics to fulfill the request (in which case it should be called with `null`).

See the main `AutofillService` documentation for more details and examples.

Parameters
`response` | `FillResponse`: autofill information for that activity, or `null` when the service cannot autofill the activity. This value may be `null`.

Throws
`IllegalStateException` | if this method or `onFailure(java.lang.CharSequence)` was already called.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*