Udostępnij za pośrednictwem


FillEventHistory.Event.ManuallyEnteredField Property

Definition

Returns which fields were available on datasets provided by the service but manually entered by the user.

public System.Collections.Generic.IDictionary<Android.Views.Autofill.AutofillId,System.Collections.Generic.ICollection<string>> ManuallyEnteredField { [Android.Runtime.Register("getManuallyEnteredField", "()Ljava/util/Map;", "", ApiSince=28)] get; }
[<get: Android.Runtime.Register("getManuallyEnteredField", "()Ljava/util/Map;", "", ApiSince=28)>]
member this.ManuallyEnteredField : System.Collections.Generic.IDictionary<Android.Views.Autofill.AutofillId, System.Collections.Generic.ICollection<string>>

Property Value

map map whose key is the id of the manually-entered field, and value is the ids of the datasets that have that value but were not selected by the user.

Attributes

Remarks

Returns which fields were available on datasets provided by the service but manually entered by the user.

For example, server provides:

FillResponse response = new FillResponse.Builder()
                 .addDataset(new Dataset.Builder(presentation1)
                     .setId("4815")
                     .setValue(usernameId, AutofillValue.forText("MrPlow"))
                     .setValue(passwordId, AutofillValue.forText("AyCaramba"))
                     .build())
                 .addDataset(new Dataset.Builder(presentation2)
                     .setId("162342")
                     .setValue(usernameId, AutofillValue.forText("ElBarto"))
                     .setValue(passwordId, AutofillValue.forText("D'OH"))
                     .build())
                 .addDataset(new Dataset.Builder(presentation3)
                     .setId("108")
                     .setValue(usernameId, AutofillValue.forText("MrPlow"))
                     .setValue(passwordId, AutofillValue.forText("D'OH"))
                     .build())
                 .build();

User doesn't select a dataset but manually enters:

username = "MrPlow";
              password = "D'OH";

Then the result is the following map:

usernameId => { "4815", "108"}
              passwordId => { "162342", "108" }

<b>Note: </b>Only set on events of type #TYPE_CONTEXT_COMMITTED.

Java documentation for android.service.autofill.FillEventHistory.Event.getManuallyEnteredField().

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