# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# FillEventHistory.Event

`public static final class FillEventHistory.Event`
`extends Object` ``

java.lang.Object
↳ | android.service.autofill.FillEventHistory.Event

Description of an event that occured after the latest call to `FillCallback#onSuccess(FillResponse)`.

## Summary

### Constants
`int` | `NO_SAVE_UI_REASON_DATASET_MATCH` All fields matched contents of datasets.
`int` | `NO_SAVE_UI_REASON_FIELD_VALIDATION_FAILED` Fields failed validation.
`int` | `NO_SAVE_UI_REASON_HAS_EMPTY_REQUIRED` There was empty value for required ids.
`int` | `NO_SAVE_UI_REASON_NONE` No reason for save dialog.
`int` | `NO_SAVE_UI_REASON_NO_SAVE_INFO` The SaveInfo associated with the FillResponse is null.
`int` | `NO_SAVE_UI_REASON_NO_VALUE_CHANGED` No value has been changed.
`int` | `NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG` The service asked to delay save.
`int` | `TYPE_AUTHENTICATION_SELECTED` A `fill response authentication` was selected.
`int` | `TYPE_CONTEXT_COMMITTED` A committed autofill context for which the autofill service provided datasets.
`int` | `TYPE_DATASETS_SHOWN` A dataset selector was shown.
`int` | `TYPE_DATASET_AUTHENTICATION_SELECTED` A `dataset authentication` was selected.
`int` | `TYPE_DATASET_SELECTED` A dataset was selected.
`int` | `TYPE_SAVE_SHOWN` A save UI was shown.

### Public methods
`Map<AutofillId, String>` | `getChangedFields()` Returns which fields in the selected datasets were changed by the user after the dataset was selected.
`Bundle` | `getClientState()` Returns the client state from the `FillResponse` used to generate this event.
`String` | `getDatasetId()` Returns the id of dataset the id was on.
`Map<AutofillId, FieldClassification>` | `getFieldsClassification()` Gets the field classification results.
`Set<String>` | `getIgnoredDatasetIds()` Returns which datasets were NOT selected by the user.
`Map<AutofillId, Set<String>>` | `getManuallyEnteredField()` Returns which fields were available on datasets provided by the service but manually entered by the user.
`int` | `getNoSaveUiReason()` Returns the reason why a save dialog was not shown.
`Set<String>` | `getSelectedDatasetIds()` Returns which datasets were selected by the user.
`int` | `getType()` Returns the type of the event.
`String` | `toString()` Returns a string representation of the object.

### 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.

## Constants

### NO_SAVE_UI_REASON_DATASET_MATCH

    public static final int NO_SAVE_UI_REASON_DATASET_MATCH

All fields matched contents of datasets.

Constant Value: 6 (0x00000006)

### NO_SAVE_UI_REASON_FIELD_VALIDATION_FAILED

    public static final int NO_SAVE_UI_REASON_FIELD_VALIDATION_FAILED

Fields failed validation.

Constant Value: 5 (0x00000005)

### NO_SAVE_UI_REASON_HAS_EMPTY_REQUIRED

    public static final int NO_SAVE_UI_REASON_HAS_EMPTY_REQUIRED

There was empty value for required ids.

Constant Value: 3 (0x00000003)

### NO_SAVE_UI_REASON_NONE

    public static final int NO_SAVE_UI_REASON_NONE

No reason for save dialog.

Constant Value: 0 (0x00000000)

### NO_SAVE_UI_REASON_NO_SAVE_INFO

    public static final int NO_SAVE_UI_REASON_NO_SAVE_INFO

The SaveInfo associated with the FillResponse is null.

Constant Value: 1 (0x00000001)

### NO_SAVE_UI_REASON_NO_VALUE_CHANGED

    public static final int NO_SAVE_UI_REASON_NO_VALUE_CHANGED

No value has been changed.

Constant Value: 4 (0x00000004)

### NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG

    public static final int NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG

The service asked to delay save.

Constant Value: 2 (0x00000002)

### TYPE_AUTHENTICATION_SELECTED

    public static final int TYPE_AUTHENTICATION_SELECTED

A `fill response authentication` was selected.

Constant Value: 2 (0x00000002)

### TYPE_CONTEXT_COMMITTED

    public static final int TYPE_CONTEXT_COMMITTED

A committed autofill context for which the autofill service provided datasets.

This event is useful to track:

- Which datasets (if any) were selected by the user (`getSelectedDatasetIds()`).
- Which datasets (if any) were NOT selected by the user (`getIgnoredDatasetIds()`).
- Which fields in the selected datasets were changed by the user after the dataset was selected (`getChangedFields()`.
- Which fields match the `UserData` set by the service.

Note: This event is only generated when:

- The autofill context is committed.
- The service provides at least one dataset in the `fill responses` associated with the context.
- The last `fill responses` associated with the context has the `FillResponse#FLAG_TRACK_CONTEXT_COMMITED` flag.

See `AutofillManager` for more information about autofill contexts.

Constant Value: 4 (0x00000004)

### TYPE_DATASETS_SHOWN

    public static final int TYPE_DATASETS_SHOWN

A dataset selector was shown.

This event is fired whenever the autofill UI was presented to the user.

Constant Value: 5 (0x00000005)

### TYPE_DATASET_AUTHENTICATION_SELECTED

    public static final int TYPE_DATASET_AUTHENTICATION_SELECTED

A `dataset authentication` was selected. The dataset authenticated can be read from `getDatasetId()`.

Constant Value: 1 (0x00000001)

### TYPE_DATASET_SELECTED

    public static final int TYPE_DATASET_SELECTED

A dataset was selected. The dataset selected can be read from `getDatasetId()`.

Note: on Android `Build.VERSION_CODES.O`, this event was also incorrectly reported after a `dataset authentication` was selected and the service returned a dataset in the `AutofillManager#EXTRA_AUTHENTICATION_RESULT` of the activity launched from that `IntentSender`. This behavior was fixed on Android `Build.VERSION_CODES.O_MR1`.

Constant Value: 0 (0x00000000)

### TYPE_SAVE_SHOWN

    public static final int TYPE_SAVE_SHOWN

A save UI was shown.

Constant Value: 3 (0x00000003)

## Public methods

### getChangedFields

    public Map<AutofillId, String> getChangedFields ()

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"

Note: Only set on events of type `TYPE_CONTEXT_COMMITTED`.

Returns
`Map<AutofillId, String>` | 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. This value cannot be `null`.

### getClientState

    public Bundle getClientState ()

Returns the client state from the `FillResponse` used to generate this event.

Note: the state is associated with the app that was autofilled in the previous `AutofillService.onFillRequest(android.service.autofill.FillRequest, android.os.CancellationSignal, android.service.autofill.FillCallback)`, which is not necessary the same app being autofilled now.

Returns
`Bundle` | This value may be `null`.

### getDatasetId

    public String getDatasetId ()

Returns the id of dataset the id was on.

Returns
`String` | The id of dataset, or `null` the event is not associated with a dataset.

### getFieldsClassification

    public Map<AutofillId, FieldClassification> getFieldsClassification ()

Gets the field classification results.

Note: Only set on events of type `TYPE_CONTEXT_COMMITTED`, when the service requested `field classification`.

Returns
`Map<AutofillId, FieldClassification>` | This value cannot be `null`.

### getIgnoredDatasetIds

    public Set<String> getIgnoredDatasetIds ()

Returns which datasets were NOT selected by the user.

Note: Only set on events of type `TYPE_CONTEXT_COMMITTED`.

Returns
`Set<String>` | This value cannot be `null`.

### getManuallyEnteredField

    public Map<AutofillId, Set<String>> getManuallyEnteredField ()

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" }

Note: Only set on events of type `TYPE_CONTEXT_COMMITTED`.

Returns
`Map<AutofillId, Set<String>>` | 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. This value cannot be `null`.

### getNoSaveUiReason

    public int getNoSaveUiReason ()

Returns the reason why a save dialog was not shown.

Note: Only set on events of type `TYPE_CONTEXT_COMMITTED`. For the other event types, the reason is set to NO_SAVE_UI_REASON_NONE.

Returns
`int` | The reason why a save dialog was not shown. Value is `NO_SAVE_UI_REASON_NONE`, `NO_SAVE_UI_REASON_NO_SAVE_INFO`, `NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG`, `NO_SAVE_UI_REASON_HAS_EMPTY_REQUIRED`, `NO_SAVE_UI_REASON_NO_VALUE_CHANGED`, `NO_SAVE_UI_REASON_FIELD_VALIDATION_FAILED`, or `NO_SAVE_UI_REASON_DATASET_MATCH`

### getSelectedDatasetIds

    public Set<String> getSelectedDatasetIds ()

Returns which datasets were selected by the user.

Note: Only set on events of type `TYPE_CONTEXT_COMMITTED`.

Returns
`Set<String>` | This value cannot be `null`.

### getType

    public int getType ()

Returns the type of the event.

Returns
`int` | The type of the event

### toString

    public String toString ()

Returns a string representation of the object. In general, the `toString` method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The `toString` method for class `Object` returns a string consisting of the name of the class of which the object is an instance, the at-sign character ``@`', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

>      getClass().getName() + '@' + Integer.toHexString(hashCode())

Returns
`String` | a string representation of the object.

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