Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#constants) \| [Methods](https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#inhmethods)

# FillEventHistory.Event

*** ** * ** ***


`
public
static
final

class
FillEventHistory.Event
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.service.autofill.FillEventHistory.Event |

<br />

*** ** * ** ***

Description of an event that occurred after the latest call to
`https://developer.android.com/reference/android/service/autofill/FillCallback#onSuccess(android.service.autofill.FillResponse)`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_DATASET_MATCH` All fields matched contents of datasets. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_FIELD_VALIDATION_FAILED` Fields failed validation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_HAS_EMPTY_REQUIRED` There was empty value for required ids. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_NONE` No reason for save dialog. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_NO_SAVE_INFO` The SaveInfo associated with the FillResponse is null. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_NO_VALUE_CHANGED` No value has been changed. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_USING_CREDMAN` Credential Manager is invoked instead of Autofill. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG` The service asked to delay save. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_AUTHENTICATION_SELECTED` A `https://developer.android.com/reference/android/service/autofill/FillResponse.Builder#setAuthentication(android.view.autofill.AutofillId[],%20android.content.IntentSender,%20android.widget.RemoteViews)` was selected. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_CONTEXT_COMMITTED` A committed autofill context for which the autofill service provided datasets. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_DATASETS_SHOWN` A dataset selector was shown. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_DATASET_AUTHENTICATION_SELECTED` A `https://developer.android.com/reference/android/service/autofill/Dataset.Builder#setAuthentication(android.content.IntentSender)` was selected. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_DATASET_SELECTED` A dataset was selected. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_RESPONSE_DISCARDED` The FillResponse is discarded. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_SAVE_SHOWN` A save UI was shown. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_VIEW_REQUESTED_AUTOFILL` The app/user requested for a field to be Autofilled. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_CREDENTIAL_MANAGER` Credential Manager suggestions are shown instead of Autofill suggestion |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_DIALOG` The autofill suggestion is shown as a dialog presentation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_INLINE` The autofill suggestion is shown as a keyboard inline presentation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_MENU` The autofill suggestion is shown as a menu popup presentation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_UNKNOWN` The autofill suggestion presentation is unknown, this will be set for the event that is unrelated to fill Ui presentation |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. |
| ` https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/android/view/autofill/AutofillId, https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getChangedFields()() ` Returns which fields in the selected datasets were changed by the user after the dataset was selected. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getClientState()() ` Returns the client state from the `https://developer.android.com/reference/android/service/autofill/FillResponse` used to generate this event. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getDatasetId()() ` Returns the id of dataset the id was on. |
| ` https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/android/view/autofill/AutofillId, https://developer.android.com/reference/android/service/autofill/FieldClassification>` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getFieldsClassification()() ` Gets the [field classification](https://developer.android.com/reference/android/service/autofill/AutofillService#FieldClassification) results. |
| ` https://developer.android.com/reference/android/view/autofill/AutofillId` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getFocusedId()() ` Gets the `AutofillId` that's focused at the time of action |
| ` https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getIgnoredDatasetIds()() ` Returns which datasets were NOT selected by the user. |
| ` https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/android/view/autofill/AutofillId, https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>>` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getManuallyEnteredField()() ` Returns which fields were available on datasets provided by the service but manually entered by the user. |
| ` int` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getNoSaveUiReason()() ` Returns the reason why a save dialog was not shown. |
| ` https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getSelectedDatasetIds()() ` Returns which datasets were selected by the user. |
| ` https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getShownDatasetIds()() ` Returns which datasets were shown to the user. |
| ` int` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getType()() ` Returns the type of the event. |
| ` int` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getUiType()() ` Returns fill suggestion ui presentation type which corresponds to types defined in `https://developer.android.com/reference/android/service/autofill/Presentations`. |
| ` int` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#hashCode()() ` Returns a hash code value for the object. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#toString()() ` Returns a string representation of the object. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Constants

### NO_SAVE_UI_REASON_DATASET_MATCH

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_SAVE_UI_REASON_DATASET_MATCH
```

All fields matched contents of datasets.

<br />

Constant Value:

6
(0x00000006)


### NO_SAVE_UI_REASON_FIELD_VALIDATION_FAILED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_SAVE_UI_REASON_FIELD_VALIDATION_FAILED
```

Fields failed validation.

<br />

Constant Value:

5
(0x00000005)


### NO_SAVE_UI_REASON_HAS_EMPTY_REQUIRED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_SAVE_UI_REASON_HAS_EMPTY_REQUIRED
```

There was empty value for required ids.

<br />

Constant Value:

3
(0x00000003)


### NO_SAVE_UI_REASON_NONE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_SAVE_UI_REASON_NONE
```

No reason for save dialog.

<br />

Constant Value:

0
(0x00000000)


### NO_SAVE_UI_REASON_NO_SAVE_INFO

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_SAVE_UI_REASON_NO_SAVE_INFO
```

The SaveInfo associated with the FillResponse is null.

<br />

Constant Value:

1
(0x00000001)


### NO_SAVE_UI_REASON_NO_VALUE_CHANGED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_SAVE_UI_REASON_NO_VALUE_CHANGED
```

No value has been changed.

<br />

Constant Value:

4
(0x00000004)


### NO_SAVE_UI_REASON_USING_CREDMAN

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_SAVE_UI_REASON_USING_CREDMAN
```

Credential Manager is invoked instead of Autofill. When that happens, Save Dialog cannot
be shown, and this will be populated in

<br />

Constant Value:

7
(0x00000007)


### NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG
```

The service asked to delay save.

<br />

Constant Value:

2
(0x00000002)


### TYPE_AUTHENTICATION_SELECTED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_AUTHENTICATION_SELECTED
```

A `https://developer.android.com/reference/android/service/autofill/FillResponse.Builder#setAuthentication(android.view.autofill.AutofillId[],%20android.content.IntentSender,%20android.widget.RemoteViews)` was selected.

<br />

Constant Value:

2
(0x00000002)


### TYPE_CONTEXT_COMMITTED

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 (`https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getSelectedDatasetIds()`).
- Which datasets (if any) were NOT selected by the user (`https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getIgnoredDatasetIds()`).
- Which fields in the selected datasets were changed by the user after the dataset was selected (`https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getChangedFields()`.
- Which fields match the `https://developer.android.com/reference/android/service/autofill/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 `https://developer.android.com/reference/android/service/autofill/FillResponse` associated with the context.
- The last `https://developer.android.com/reference/android/service/autofill/FillResponse` associated with the context has the `https://developer.android.com/reference/android/service/autofill/FillResponse#FLAG_TRACK_CONTEXT_COMMITED` flag.

See `https://developer.android.com/reference/android/view/autofill/AutofillManager` for more information about autofill
contexts.

<br />

Constant Value:

4
(0x00000004)


### TYPE_DATASETS_SHOWN

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

<br />

Constant Value:

5
(0x00000005)


### TYPE_DATASET_AUTHENTICATION_SELECTED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_DATASET_AUTHENTICATION_SELECTED
```

A `https://developer.android.com/reference/android/service/autofill/Dataset.Builder#setAuthentication(android.content.IntentSender)` was
selected. The dataset authenticated can be read from `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getDatasetId()`.

<br />

Constant Value:

1
(0x00000001)


### TYPE_DATASET_SELECTED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_DATASET_SELECTED
```

A dataset was selected. The dataset selected can be read from `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#getDatasetId()`.

**Note:** on Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#O`, this event was also
incorrectly reported after a
`https://developer.android.com/reference/android/service/autofill/Dataset.Builder#setAuthentication(android.content.IntentSender)` was
selected and the service returned a dataset in the
`https://developer.android.com/reference/android/view/autofill/AutofillManager#EXTRA_AUTHENTICATION_RESULT` of the activity launched from that
`https://developer.android.com/reference/android/content/IntentSender`. This behavior was fixed on Android
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#O_MR1`.

<br />

Constant Value:

0
(0x00000000)


### TYPE_RESPONSE_DISCARDED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_RESPONSE_DISCARDED
```

The FillResponse is discarded. This could only be available in FillEventHistory of
Augmented Autofill and Personal Context.

This event is fired when both Augmented Autofill service and
`https://developer.android.com/` return non-null
FillResponses, and one of them is discarded. OEMs can choose which FillResponse shall
take the priority.

<br />

Constant Value:

7
(0x00000007)


### TYPE_SAVE_SHOWN

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_SAVE_SHOWN
```

A save UI was shown.

<br />

Constant Value:

3
(0x00000003)


### TYPE_VIEW_REQUESTED_AUTOFILL

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_VIEW_REQUESTED_AUTOFILL
```

The app/user requested for a field to be Autofilled.

This event is fired when the view has been entered (by user or app) in order
to differentiate from FillRequests that have been pretriggered for FillDialogs.

For example, the user might navigate away from a screen without tapping any
fields. In this case, a FillRequest/FillResponse has been generated, but was
not used for Autofilling. The user did not intend to see an Autofill result,
but a FillRequest was still generated. This is different from when the user
did tap on a field after the pretriggered FillRequest, this event will appear
in the FillEventHistory, signaling that the user did intend to Autofill
something.

<br />

Constant Value:

6
(0x00000006)


### UI_TYPE_CREDENTIAL_MANAGER

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_TYPE_CREDENTIAL_MANAGER
```

Credential Manager suggestions are shown instead of Autofill suggestion

<br />

Constant Value:

4
(0x00000004)


### UI_TYPE_DIALOG

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_TYPE_DIALOG
```

The autofill suggestion is shown as a dialog presentation.

<br />

Constant Value:

3
(0x00000003)


### UI_TYPE_INLINE

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_TYPE_INLINE
```

The autofill suggestion is shown as a keyboard inline presentation.

<br />

Constant Value:

2
(0x00000002)


### UI_TYPE_MENU

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_TYPE_MENU
```

The autofill suggestion is shown as a menu popup presentation.

<br />

Constant Value:

1
(0x00000001)


### UI_TYPE_UNKNOWN

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_TYPE_UNKNOWN
```

The autofill suggestion presentation is unknown, this will be set for the event
that is unrelated to fill Ui presentation

<br />

Constant Value:

0
(0x00000000)


## Public methods

### equals

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object o)
```

Indicates whether some other object is "equal to" this one.


The `equals` method implements an equivalence relation
on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.


An equivalence relation partitions the elements it operates on
into *equivalence classes*; all the members of an
equivalence class are equal to each other. Members of an
equivalence class are substitutable for each other, at least
for some purposes.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getChangedFields

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_CONTEXT_COMMITTED`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/android/view/autofill/AutofillId, https://developer.android.com/reference/java/lang/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`. <br /> |

### getClientState

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getClientState ()
```

Returns the client state from the `https://developer.android.com/reference/android/service/autofill/FillResponse` used to generate this event.

**Note:** the state is associated with the app that was autofilled in the previous
`https://developer.android.com/reference/android/service/autofill/AutofillService#onFillRequest(android.service.autofill.FillRequest,%20android.os.CancellationSignal,%20android.service.autofill.FillCallback)`,
which is not necessary the same app being autofilled now.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | This value may be `null`. <br /> |

### getDatasetId

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getDatasetId ()
```

Returns the id of dataset the id was on.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The id of dataset, or `null` the event is not associated with a dataset. <br /> |

### getFieldsClassification

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Map<AutofillId, FieldClassification> getFieldsClassification ()
```

Gets the [field classification](https://developer.android.com/reference/android/service/autofill/AutofillService#FieldClassification)
results.

**Note:** Only set on events of type `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_CONTEXT_COMMITTED`, when the
service requested `https://developer.android.com/reference/android/service/autofill/FillResponse.Builder#setFieldClassificationIds(android.view.autofill.AutofillId[])`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/android/view/autofill/AutofillId, https://developer.android.com/reference/android/service/autofill/FieldClassification>` | This value cannot be `null`. <br /> |

### getFocusedId

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AutofillId getFocusedId ()
```

Gets the `AutofillId` that's focused at the time of action

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillId` | This value may be `null`. <br /> |

### getIgnoredDatasetIds

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Set<String> getIgnoredDatasetIds ()
```

Returns which datasets were NOT selected by the user.

**Note:** Only set on events of type `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_CONTEXT_COMMITTED`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | This value cannot be `null`. <br /> |

### getManuallyEnteredField

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_CONTEXT_COMMITTED`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/android/view/autofill/AutofillId, https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/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`. <br /> |

### getNoSaveUiReason

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getNoSaveUiReason ()
```

Returns the reason why a save dialog was not shown.

**Note:** Only set on events of type `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_CONTEXT_COMMITTED`. For the other
event types, the reason is set to NO_SAVE_UI_REASON_NONE.

<br />

| Returns ||
|---|---|
| `int` | The reason why a save dialog was not shown. Value is one of the following: - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_NONE` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_NO_SAVE_INFO` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_HAS_EMPTY_REQUIRED` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_NO_VALUE_CHANGED` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_FIELD_VALIDATION_FAILED` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#NO_SAVE_UI_REASON_DATASET_MATCH` |

### getSelectedDatasetIds

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Set<String> getSelectedDatasetIds ()
```

Returns which datasets were selected by the user.

**Note:** Only set on events of type `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_CONTEXT_COMMITTED`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | This value cannot be `null`. <br /> |

### getShownDatasetIds

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Set<String> getShownDatasetIds ()
```

Returns which datasets were shown to the user.

**Note:** Only set on events of type `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_DATASETS_SHOWN`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | This value cannot be `null`. <br /> |

### getType

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getType ()
```

Returns the type of the event.

<br />

| Returns ||
|---|---|
| `int` | The type of the event <br /> |

### getUiType

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getUiType ()
```

Returns fill suggestion ui presentation type which corresponds to types
defined in `https://developer.android.com/reference/android/service/autofill/Presentations`.

**Note:** Only set on events of type `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_DATASETS_SHOWN` and
`https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#TYPE_DATASET_SELECTED`. For the other event types, the type is set to
`https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_UNKNOWN`.

<br />

| Returns ||
|---|---|
| `int` | The ui presentation type shown for user. Value is one of the following: - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_UNKNOWN` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_MENU` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_INLINE` - `https://developer.android.com/reference/android/service/autofill/FillEventHistory.Event#UI_TYPE_DIALOG` |

### hashCode

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
`https://developer.android.com/reference/java/util/HashMap`.


The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### toString

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |