다음을 통해 공유


AutofillService.FillEventHistory Property

Definition

Gets the events that happened after the last AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback) call.

public Android.Service.Autofill.FillEventHistory? FillEventHistory { [Android.Runtime.Register("getFillEventHistory", "()Landroid/service/autofill/FillEventHistory;", "", ApiSince=26)] get; }
[<get: Android.Runtime.Register("getFillEventHistory", "()Landroid/service/autofill/FillEventHistory;", "", ApiSince=26)>]
member this.FillEventHistory : Android.Service.Autofill.FillEventHistory

Property Value

The history or null if there are no events.

Attributes

Remarks

Gets the events that happened after the last AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback) call.

This method is typically used to keep track of previous user actions to optimize further requests. For example, the service might return email addresses in alphabetical order by default, but change that order based on the address the user picked on previous requests.

The history is not persisted over reboots, and it's cleared every time the service replies to a #onFillRequest(FillRequest, CancellationSignal, FillCallback) by calling FillCallback#onSuccess(FillResponse) or FillCallback#onFailure(CharSequence) (if the service doesn't call any of these methods, the history will clear out after some pre-defined time). Hence, the service should call #getFillEventHistory() before finishing the FillCallback.

Java documentation for android.service.autofill.AutofillService.getFillEventHistory().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to