Share via


FillEventHistory.Event.ChangedFields Property

Definition

Returns which fields in the selected datasets were changed by the user after the dataset was selected.

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

Property Value

map map whose key is the id of the change fields, and value is the id of dataset that has that field and was selected by the user.

Attributes

Remarks

Returns which fields in the selected datasets were changed by the user after the dataset was selected.

For example, server provides:

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

User select both datasets (for username and password) but after the fields are autofilled, user changes them to:

username = "ElBarto";
              password = "AyCaramba";

Then the result is the following map:

usernameId => "4815"
              passwordId => "162342"

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

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

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