# SearchResult

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

# SearchResult

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/app/appsearch/SearchResult "View this page in Kotlin")\|Java

`
public

final

class
SearchResult
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


implements

`[Parcelable](https://developer.android.com/reference/android/os/Parcelable)`


`

|---|------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.appsearch.SearchResult |

<br />

*** ** * ** ***

This class represents one of the results obtained from an AppSearch query.

This allows clients to obtain:

- The document which matched, using[getGenericDocument()](https://developer.android.com/reference/android/app/appsearch/SearchResult#getGenericDocument())
- Information about which properties in the document matched, and "snippet" information containing textual summaries of the document's matches, using[getMatchInfos()](https://developer.android.com/reference/android/app/appsearch/SearchResult#getMatchInfos())

"Snippet" refers to a substring of text from the content of document that is returned as a part of search result.  
**See also:**

- [SearchResults](https://developer.android.com/reference/android/app/appsearch/SearchResults)

## Summary

|                                                                                                                                                              ### Nested classes                                                                                                                                                              ||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [SearchResult.Builder](https://developer.android.com/reference/android/app/appsearch/SearchResult.Builder) Builder for[SearchResult](https://developer.android.com/reference/android/app/appsearch/SearchResult)objects.                                                                                                           |
| ` class` | [SearchResult.EmbeddingMatchInfo](https://developer.android.com/reference/android/app/appsearch/SearchResult.EmbeddingMatchInfo) This class represents match objects for any snippets that might be present in[SearchResults](https://developer.android.com/reference/android/app/appsearch/SearchResults)from an embedding query. |
| ` class` | [SearchResult.MatchInfo](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo) This class represents match objects for any snippets that might be present in[SearchResults](https://developer.android.com/reference/android/app/appsearch/SearchResults)from a query.                              |
| ` class` | [SearchResult.MatchRange](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange) Class providing the position range of a text match information.                                                                                                                                                   |
| ` class` | [SearchResult.TextMatchInfo](https://developer.android.com/reference/android/app/appsearch/SearchResult.TextMatchInfo) This class represents match objects for any text match snippets that might be present in[SearchResults](https://developer.android.com/reference/android/app/appsearch/SearchResults)from a string query.    |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable) |-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) Descriptor bit used with[describeContents()](https://developer.android.com/reference/android/os/Parcelable#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor.                                                                                                                                            | | `int` | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE) Flag for use with[writeToParcel(Parcel, int)](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 `[Creator](https://developer.android.com/reference/android/os/Parcelable.Creator)`<`[SearchResult](https://developer.android.com/reference/android/app/appsearch/SearchResult)`>` | [CREATOR](https://developer.android.com/reference/android/app/appsearch/SearchResult#CREATOR) <br /> |

|                                                                                                                                                                                                                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[String](https://developer.android.com/reference/java/lang/String)                                                                                                                                                                                                           | ` `[getDatabaseName](https://developer.android.com/reference/android/app/appsearch/SearchResult#getDatabaseName())`() ` Contains the database name that stored the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument).                                                                                                                                                                                                                                                                            |
| ` `[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument)                                                                                                                                                                             | ` `[getGenericDocument](https://developer.android.com/reference/android/app/appsearch/SearchResult#getGenericDocument())`() ` Contains the matching[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument).                                                                                                                                                                                                                                                                                           |
| ` `[List](https://developer.android.com/reference/java/util/List)`<`[Double](https://developer.android.com/reference/java/lang/Double)`>`                                                                                                                                       | ` `[getInformationalRankingSignals](https://developer.android.com/reference/android/app/appsearch/SearchResult#getInformationalRankingSignals())`() ` Returns the informational ranking signals of the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument), according to the expressions added in[SearchSpec.Builder.addInformationalRankingExpressions](https://developer.android.com/reference/android/app/appsearch/SearchSpec.Builder#addInformationalRankingExpressions(java.lang.String[])). |
| ` `[List](https://developer.android.com/reference/java/util/List)`<`[SearchResult](https://developer.android.com/reference/android/app/appsearch/SearchResult)`>`                                                                                                               | ` `[getJoinedResults](https://developer.android.com/reference/android/app/appsearch/SearchResult#getJoinedResults())`() ` Gets a list of[SearchResult](https://developer.android.com/reference/android/app/appsearch/SearchResult)joined from the join operation.                                                                                                                                                                                                                                                                              |
| ` `[List](https://developer.android.com/reference/java/util/List)`<`[SearchResult.MatchInfo](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo)`>`                                                                                           | ` `[getMatchInfos](https://developer.android.com/reference/android/app/appsearch/SearchResult#getMatchInfos())`() ` Returns a list of[MatchInfo](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo)s providing information about how the document in[getGenericDocument()](https://developer.android.com/reference/android/app/appsearch/SearchResult#getGenericDocument())matched the query.                                                                                                               |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                                                                                                                                                                                           | ` `[getPackageName](https://developer.android.com/reference/android/app/appsearch/SearchResult#getPackageName())`() ` Contains the package name of the app that stored the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument).                                                                                                                                                                                                                                                                    |
| ` `[Map](https://developer.android.com/reference/java/util/Map)`<`[String](https://developer.android.com/reference/java/lang/String)`, `[List](https://developer.android.com/reference/java/util/List)`<`[String](https://developer.android.com/reference/java/lang/String)`>>` | ` `[getParentTypeMap](https://developer.android.com/reference/android/app/appsearch/SearchResult#getParentTypeMap())`() ` Returns the map from schema type names to the list of their parent types.                                                                                                                                                                                                                                                                                                                                            |
| ` double`                                                                                                                                                                                                                                                                       | ` `[getRankingSignal](https://developer.android.com/reference/android/app/appsearch/SearchResult#getRankingSignal())`() ` Returns the ranking signal of the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument), according to the ranking strategy set in[SearchSpec.Builder.setRankingStrategy(int)](https://developer.android.com/reference/android/app/appsearch/SearchSpec.Builder#setRankingStrategy(int)).                                                                                   |
| ` void`                                                                                                                                                                                                                                                                         | ` `[writeToParcel](https://developer.android.com/reference/android/app/appsearch/SearchResult#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel.                                                                                                                                                                                                                                                                           |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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` `[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable)` ` |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int`  | ` `[describeContents](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` | ` `[writeToParcel](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel. | ||

## Fields

### CREATOR

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[T Extensions 13](https://developer.android.com/sdkExtensions)  

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

<br />

<br />

## Public methods

### getDatabaseName

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

```
public String getDatabaseName ()
```

Contains the database name that stored the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument).

<br />

|                                                                             Returns                                                                             ||
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | Name of the database within which the document is stored This value cannot be`null`. <br /> |

### getGenericDocument

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

```
public GenericDocument getGenericDocument ()
```

Contains the matching[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument).

<br />

|                                                                                    Returns                                                                                    ||
|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
| [GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument) | Document object which matched the query. This value cannot be`null`. <br /> |

### getInformationalRankingSignals

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

```
public List<Double> getInformationalRankingSignals ()
```

Returns the informational ranking signals of the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument), according to the expressions added in[SearchSpec.Builder.addInformationalRankingExpressions](https://developer.android.com/reference/android/app/appsearch/SearchSpec.Builder#addInformationalRankingExpressions(java.lang.String[])).

<br />

|                                                                                  Returns                                                                                   ||
|----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [List](https://developer.android.com/reference/java/util/List)`<`[Double](https://developer.android.com/reference/java/lang/Double)`>` | This value cannot be`null`. <br /> |

### getJoinedResults

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

```
public List<SearchResult> getJoinedResults ()
```

Gets a list of[SearchResult](https://developer.android.com/reference/android/app/appsearch/SearchResult)joined from the join operation.

These joined documents match the outer document as specified in the[JoinSpec](https://developer.android.com/reference/android/app/appsearch/JoinSpec)with parentPropertyExpression and childPropertyExpression. They are ordered according to the[JoinSpec.getNestedSearchSpec](https://developer.android.com/reference/android/app/appsearch/JoinSpec#getNestedSearchSpec()), and as many SearchResults as specified by[JoinSpec.getMaxJoinedResultCount()](https://developer.android.com/reference/android/app/appsearch/JoinSpec#getMaxJoinedResultCount())will be returned. If no[JoinSpec](https://developer.android.com/reference/android/app/appsearch/JoinSpec)was specified, this returns an empty list.

This method is inefficient to call repeatedly, as new[SearchResult](https://developer.android.com/reference/android/app/appsearch/SearchResult)objects are created each time.

<br />

|                                                                                                                         Returns                                                                                                                         ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| [List](https://developer.android.com/reference/java/util/List)`<`[SearchResult](https://developer.android.com/reference/android/app/appsearch/SearchResult)`>` | a List of SearchResults containing joined documents. This value cannot be`null`. <br /> |

### getMatchInfos

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

```
public List<SearchResult.MatchInfo> getMatchInfos ()
```

Returns a list of[MatchInfo](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo)s providing information about how the document in[getGenericDocument()](https://developer.android.com/reference/android/app/appsearch/SearchResult#getGenericDocument())matched the query.

<br />

|                                                                                                                                                                                                                                                                                                                                                                               Returns                                                                                                                                                                                                                                                                                                                                                                                ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [List](https://developer.android.com/reference/java/util/List)`<`[SearchResult.MatchInfo](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo)`>` | List of matches based on[SearchSpec](https://developer.android.com/reference/android/app/appsearch/SearchSpec). If snippeting is disabled using[SearchSpec.Builder.setSnippetCount(int)](https://developer.android.com/reference/android/app/appsearch/SearchSpec.Builder#setSnippetCount(int))or[SearchSpec.Builder.setSnippetCountPerProperty(int)](https://developer.android.com/reference/android/app/appsearch/SearchSpec.Builder#setSnippetCountPerProperty(int)), for all results after that value, this method returns an empty list. This value cannot be`null`. <br /> |

### getPackageName

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

```
public String getPackageName ()
```

Contains the package name of the app that stored the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument).

<br />

|                                                                   Returns                                                                    ||
|--------------------------------------------------------------------|--------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | Package name that stored the document This value cannot be`null`. <br /> |

### getParentTypeMap

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

```
public Map<String, List<String>> getParentTypeMap ()
```

Returns the map from schema type names to the list of their parent types.

The map includes entries for the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument)'s own type and all of the nested documents' types. Child types are guaranteed to appear before parent types in each list.

Parent types include transitive parents.

Calling this function repeatedly is inefficient. Prefer to retain the Map returned by this function, rather than calling it multiple times.

<br />

|                                                                                                                                                     Returns                                                                                                                                                      ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [Map](https://developer.android.com/reference/java/util/Map)`<`[String](https://developer.android.com/reference/java/lang/String)`, `[List](https://developer.android.com/reference/java/util/List)`<`[String](https://developer.android.com/reference/java/lang/String)`>>` | This value cannot be`null`. <br /> |

### getRankingSignal

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

```
public double getRankingSignal ()
```

Returns the ranking signal of the[GenericDocument](https://developer.android.com/reference/android/app/appsearch/GenericDocument), according to the ranking strategy set in[SearchSpec.Builder.setRankingStrategy(int)](https://developer.android.com/reference/android/app/appsearch/SearchSpec.Builder#setRankingStrategy(int)).

The meaning of the ranking signal and its value is determined by the selected ranking strategy:

- [SearchSpec.RANKING_STRATEGY_NONE](https://developer.android.com/reference/android/app/appsearch/SearchSpec#RANKING_STRATEGY_NONE)- this value will be 0
- [SearchSpec.RANKING_STRATEGY_DOCUMENT_SCORE](https://developer.android.com/reference/android/app/appsearch/SearchSpec#RANKING_STRATEGY_DOCUMENT_SCORE)- the value returned by calling[GenericDocument.getScore()](https://developer.android.com/reference/android/app/appsearch/GenericDocument#getScore())on the document returned by[getGenericDocument()](https://developer.android.com/reference/android/app/appsearch/SearchResult#getGenericDocument())
- [SearchSpec.RANKING_STRATEGY_CREATION_TIMESTAMP](https://developer.android.com/reference/android/app/appsearch/SearchSpec#RANKING_STRATEGY_CREATION_TIMESTAMP)- the value returned by calling[GenericDocument.getCreationTimestampMillis()](https://developer.android.com/reference/android/app/appsearch/GenericDocument#getCreationTimestampMillis())on the document returned by[getGenericDocument()](https://developer.android.com/reference/android/app/appsearch/SearchResult#getGenericDocument())
- [SearchSpec.RANKING_STRATEGY_RELEVANCE_SCORE](https://developer.android.com/reference/android/app/appsearch/SearchSpec#RANKING_STRATEGY_RELEVANCE_SCORE)- an arbitrary double value where a higher value means more relevant
- [SearchSpec.RANKING_STRATEGY_USAGE_COUNT](https://developer.android.com/reference/android/app/appsearch/SearchSpec#RANKING_STRATEGY_USAGE_COUNT)- the number of times usage has been reported for the document returned by[getGenericDocument()](https://developer.android.com/reference/android/app/appsearch/SearchResult#getGenericDocument())
- [SearchSpec.RANKING_STRATEGY_USAGE_LAST_USED_TIMESTAMP](https://developer.android.com/reference/android/app/appsearch/SearchSpec#RANKING_STRATEGY_USAGE_LAST_USED_TIMESTAMP)- the timestamp of the most recent usage that has been reported for the document returned by[getGenericDocument()](https://developer.android.com/reference/android/app/appsearch/SearchResult#getGenericDocument())

<br />

<br />

|                     Returns                     ||
|----------|---------------------------------------|
| `double` | Ranking signal of the document <br /> |

### writeToParcel

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

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

Flatten this object in to a Parcel.

<br />

|                                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                                ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `dest`  | `Parcel`: This value cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE). Value is either`0`or a combination of[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES <br /> |