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

# SaveInfo

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/service/autofill/SaveInfo "View this page in Kotlin") \|Java


`
public

final

class
SaveInfo
`


`

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


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

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

<br />

*** ** * ** ***

Information used to indicate that an `https://developer.android.com/reference/android/service/autofill/AutofillService` is interested on saving the
user-inputed data for future use, through a
`https://developer.android.com/reference/android/service/autofill/AutofillService#onSaveRequest(android.service.autofill.SaveRequest,%20android.service.autofill.SaveCallback)`
call.

A `https://developer.android.com/reference/android/service/autofill/SaveInfo` is always associated with a `https://developer.android.com/reference/android/service/autofill/FillResponse`, and it contains at least
two pieces of information:

1. The type(s) of user data (like password or credit card info) that would be saved.
2. The minimum set of views (represented by their `https://developer.android.com/reference/android/view/autofill/AutofillId`) that need to be changed to trigger a save request.

Typically, the `https://developer.android.com/reference/android/service/autofill/SaveInfo` contains the same `id`s as the `https://developer.android.com/reference/android/service/autofill/Dataset`:

```
   new FillResponse.Builder()
       .addDataset(new Dataset.Builder()
           .setValue(id1, AutofillValue.forText("homer"), createPresentation("homer")) // username
           .setValue(id2, AutofillValue.forText("D'OH!"), createPresentation("password for homer")) // password
           .build())
       .setSaveInfo(new SaveInfo.Builder(
           SaveInfo.SAVE_DATA_TYPE_USERNAME | SaveInfo.SAVE_DATA_TYPE_PASSWORD,
           new AutofillId[] { id1, id2 }).build())
       .build();
 
```

The save type flags are used to display the appropriate strings in the autofill save UI.
You can pass multiple values, but try to keep it short if possible. In the above example, just
`SaveInfo.SAVE_DATA_TYPE_PASSWORD` would be enough.

There might be cases where the `https://developer.android.com/reference/android/service/autofill/AutofillService` knows how to fill the screen,
but the user has no data for it. In that case, the `https://developer.android.com/reference/android/service/autofill/FillResponse` should contain just the
`https://developer.android.com/reference/android/service/autofill/SaveInfo`, but no `https://developer.android.com/reference/android/service/autofill/Dataset`:

```
   new FillResponse.Builder()
       .setSaveInfo(new SaveInfo.Builder(SaveInfo.SAVE_DATA_TYPE_PASSWORD,
           new AutofillId[] { id1, id2 }).build())
       .build();
 
```

There might be cases where the user data in the `https://developer.android.com/reference/android/service/autofill/AutofillService` is enough
to populate some fields but not all, and the service would still be interested on saving the
other fields. In that case, the service could set the
`https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder#setOptionalIds(android.view.autofill.AutofillId[])` as well:

```
   new FillResponse.Builder()
       .addDataset(new Dataset.Builder()
           .setValue(id1, AutofillValue.forText("742 Evergreen Terrace"),
               createPresentation("742 Evergreen Terrace")) // street
           .setValue(id2, AutofillValue.forText("Springfield"),
               createPresentation("Springfield")) // city
           .build())
       .setSaveInfo(new SaveInfo.Builder(SaveInfo.SAVE_DATA_TYPE_ADDRESS,
           new AutofillId[] { id1, id2 }) // street and  city
           .setOptionalIds(new AutofillId[] { id3, id4 }) // state and zipcode
           .build())
       .build();
 
```

### Triggering a save request

The `https://developer.android.com/reference/android/service/autofill/AutofillService#onSaveRequest(android.service.autofill.SaveRequest,%20android.service.autofill.SaveCallback)` can be triggered after
any of the following events:

- The `https://developer.android.com/reference/android/app/Activity` finishes.
- The app explicitly calls `https://developer.android.com/reference/android/view/autofill/AutofillManager#commit()`.
- All required views become invisible (if the `https://developer.android.com/reference/android/service/autofill/SaveInfo` was created with the `https://developer.android.com/reference/android/service/autofill/SaveInfo#FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE` flag).
- The user clicks a specific view (defined by `https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder#setTriggerId(android.view.autofill.AutofillId)`.

But it is only triggered when all conditions below are met:

- The `https://developer.android.com/reference/android/service/autofill/SaveInfo` associated with the `https://developer.android.com/reference/android/service/autofill/FillResponse` is not `null` neither has the `https://developer.android.com/reference/android/service/autofill/SaveInfo#FLAG_DELAY_SAVE` flag.
- The `https://developer.android.com/reference/android/view/autofill/AutofillValue`s of all required views (as set by the `requiredIds` passed to the `https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder` constructor are not empty.
- The `https://developer.android.com/reference/android/view/autofill/AutofillValue` of at least one view (be it required or optional) has changed (i.e., it's neither the same value passed in a `https://developer.android.com/reference/android/service/autofill/Dataset`, nor the initial value presented in the view).
- There is no `https://developer.android.com/reference/android/service/autofill/Dataset` in the last `https://developer.android.com/reference/android/service/autofill/FillResponse` that completely matches the screen state (i.e., all required and optional fields in the dataset have the same value as the fields in the screen).
- The user explicitly tapped the autofill save UI asking to save data for autofill.

### Customizing the autofill save UI

The service can also customize some aspects of the autofill save UI:

- Add a simple subtitle by calling `https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder#setDescription(java.lang.CharSequence)`.
- Add a customized subtitle by calling `https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder#setCustomDescription(android.service.autofill.CustomDescription)`.
- Customize the button used to reject the save request by calling `https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder#setNegativeAction(int,%20android.content.IntentSender)`.
- Decide whether the UI should be shown based on the user input validation by calling `https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder#setValidator(android.service.autofill.Validator)`.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder` A builder for `https://developer.android.com/reference/android/service/autofill/SaveInfo` objects. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#FLAG_DELAY_SAVE` Postpone the autofill save UI. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#FLAG_DONT_SAVE_ON_FINISH` By default, a save request is automatically [triggered](https://developer.android.com/reference/android/service/autofill/SaveInfo#TriggeringSaveRequest) once the `https://developer.android.com/reference/android/app/Activity` finishes. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE` Usually, a save request is only automatically [triggered](https://developer.android.com/reference/android/service/autofill/SaveInfo#TriggeringSaveRequest) once the `https://developer.android.com/reference/android/app/Activity` finishes. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#NEGATIVE_BUTTON_STYLE_CANCEL` Style for the negative button of the save UI to cancel the save operation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#NEGATIVE_BUTTON_STYLE_NEVER` Style for the negative button of the save UI to never do the save operation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#NEGATIVE_BUTTON_STYLE_REJECT` Style for the negative button of the save UI to reject the save operation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#POSITIVE_BUTTON_STYLE_CONTINUE` Style for the positive button of save UI to have next action before the save operation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#POSITIVE_BUTTON_STYLE_SAVE` Style for the positive button of save UI to request the save operation. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_ADDRESS` Type used on when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a physical address (such as street, city, state, etc). |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_CREDIT_CARD` Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a credit card. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_DEBIT_CARD` Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a debit card. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_EMAIL_ADDRESS` Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents just an email address, without a password. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_GENERIC` Type used when the service can save the contents of a screen, but cannot describe what the content is for. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_GENERIC_CARD` Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a card that does not a specified card or cannot identify what the card is for. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_PASSWORD` Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents user credentials that have a password. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_PAYMENT_CARD` Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a payment card except for credit and debit cards. |
| `int` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#SAVE_DATA_TYPE_USERNAME` Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents just an username, without a password. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/service/autofill/SaveInfo>` | `https://developer.android.com/reference/android/service/autofill/SaveInfo#CREATOR` |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/service/autofill/SaveInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/service/autofill/SaveInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/service/autofill/SaveInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel parcel, int flags) ` Flatten this object in to a Parcel. |

| ### 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*. | ||
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### FLAG_DELAY_SAVE

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

```
public static final int FLAG_DELAY_SAVE
```

Postpone the autofill save UI.

If flag is set, the autofill save UI is not triggered when the
autofill context associated with the response associated with this `https://developer.android.com/reference/android/service/autofill/SaveInfo` is
committed (with `https://developer.android.com/reference/android/view/autofill/AutofillManager#commit()`). Instead, the `https://developer.android.com/reference/android/service/autofill/FillContext`
is delivered in future fill requests (with `https://developer.android.com/reference/android/service/autofill/AutofillService#onFillRequest(android.service.autofill.FillRequest,%20android.os.CancellationSignal,%20android.service.autofill.FillCallback)`)
and save request (with `https://developer.android.com/reference/android/service/autofill/AutofillService#onSaveRequest(android.service.autofill.SaveRequest,%20android.service.autofill.SaveCallback)`)
of an activity belonging to the same task.

This flag should be used when the service detects that the application uses
multiple screens to implement an autofillable workflow (for example, one screen for the
username field, another for password).

<br />

Constant Value:

4
(0x00000004)


### FLAG_DONT_SAVE_ON_FINISH

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

```
public static final int FLAG_DONT_SAVE_ON_FINISH
```

By default, a save request is automatically [triggered](https://developer.android.com/reference/android/service/autofill/SaveInfo#TriggeringSaveRequest)
once the `https://developer.android.com/reference/android/app/Activity` finishes. If this flag is set, finishing the activity doesn't
trigger a save request.

This flag is typically used in conjunction with `https://developer.android.com/reference/android/service/autofill/SaveInfo.Builder#setTriggerId(android.view.autofill.AutofillId)`.

<br />

Constant Value:

2
(0x00000002)


### FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE

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

```
public static final int FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE
```

Usually, a save request is only automatically [triggered](https://developer.android.com/reference/android/service/autofill/SaveInfo#TriggeringSaveRequest)
once the `https://developer.android.com/reference/android/app/Activity` finishes. If this flag is set, it is triggered once all saved views
become invisible.

<br />

Constant Value:

1
(0x00000001)


### NEGATIVE_BUTTON_STYLE_CANCEL

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

```
public static final int NEGATIVE_BUTTON_STYLE_CANCEL
```

Style for the negative button of the save UI to cancel the
save operation. In this case, the user tapping the negative
button signals that they would prefer to not save the filled
content.

<br />

Constant Value:

0
(0x00000000)


### NEGATIVE_BUTTON_STYLE_NEVER

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

```
public static final int NEGATIVE_BUTTON_STYLE_NEVER
```

Style for the negative button of the save UI to never do the
save operation. This means that the user does not need to save
any data on this activity or application. Once the user tapping
the negative button, the service should never trigger the save
UI again. In addition to this, must consider providing restore
options for the user.

<br />

Constant Value:

2
(0x00000002)


### NEGATIVE_BUTTON_STYLE_REJECT

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

```
public static final int NEGATIVE_BUTTON_STYLE_REJECT
```

Style for the negative button of the save UI to reject the
save operation. This could be useful if the user needs to
opt-in your service and the save prompt is an advertisement
of the potential value you can add to the user. In this
case, the user tapping the negative button sends a strong
signal that the feature may not be useful and you may
consider some backoff strategy.

<br />

Constant Value:

1
(0x00000001)


### POSITIVE_BUTTON_STYLE_CONTINUE

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

```
public static final int POSITIVE_BUTTON_STYLE_CONTINUE
```

Style for the positive button of save UI to have next action before the save operation.
This could be useful if the filled content contains sensitive personally identifiable
information and then requires user confirmation or verification. In this case, the user
tapping the positive button signals that they would complete the next required action
to save the filled content.

<br />

Constant Value:

1
(0x00000001)


### POSITIVE_BUTTON_STYLE_SAVE

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

```
public static final int POSITIVE_BUTTON_STYLE_SAVE
```

Style for the positive button of save UI to request the save operation.
In this case, the user tapping the positive button signals that they
agrees to save the filled content.

<br />

Constant Value:

0
(0x00000000)


### SAVE_DATA_TYPE_ADDRESS

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

```
public static final int SAVE_DATA_TYPE_ADDRESS
```

Type used on when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a physical address (such as street,
city, state, etc).

<br />

Constant Value:

2
(0x00000002)


### SAVE_DATA_TYPE_CREDIT_CARD

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

```
public static final int SAVE_DATA_TYPE_CREDIT_CARD
```

Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a credit card.

<br />

Constant Value:

4
(0x00000004)


### SAVE_DATA_TYPE_DEBIT_CARD

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

```
public static final int SAVE_DATA_TYPE_DEBIT_CARD
```

Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a debit card.

<br />

Constant Value:

32
(0x00000020)


### SAVE_DATA_TYPE_EMAIL_ADDRESS

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

```
public static final int SAVE_DATA_TYPE_EMAIL_ADDRESS
```

Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents just an email address, without a password.

<br />

Constant Value:

16
(0x00000010)


### SAVE_DATA_TYPE_GENERIC

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

```
public static final int SAVE_DATA_TYPE_GENERIC
```

Type used when the service can save the contents of a screen, but cannot describe what
the content is for.

<br />

Constant Value:

0
(0x00000000)


### SAVE_DATA_TYPE_GENERIC_CARD

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

```
public static final int SAVE_DATA_TYPE_GENERIC_CARD
```

Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a card that does not a specified card or
cannot identify what the card is for.

<br />

Constant Value:

128
(0x00000080)


### SAVE_DATA_TYPE_PASSWORD

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

```
public static final int SAVE_DATA_TYPE_PASSWORD
```

Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents user credentials that have a password.

<br />

Constant Value:

1
(0x00000001)


### SAVE_DATA_TYPE_PAYMENT_CARD

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

```
public static final int SAVE_DATA_TYPE_PAYMENT_CARD
```

Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents a payment card except for credit and
debit cards.

<br />

Constant Value:

64
(0x00000040)


### SAVE_DATA_TYPE_USERNAME

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

```
public static final int SAVE_DATA_TYPE_USERNAME
```

Type used when the `https://developer.android.com/reference/android/service/autofill/FillResponse` represents just an username, without a password.

<br />

Constant Value:

8
(0x00000008)


## Fields

### CREATOR

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

```
public static final Creator<SaveInfo> CREATOR
```

<br />

<br />

## Public methods

### describeContents

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

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

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

### writeToParcel

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

```
public void writeToParcel (Parcel parcel, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `parcel` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |