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

# SearchableInfo

*** ** * ** ***

` public final class SearchableInfo `   
` 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.app.SearchableInfo |

<br />

*** ** * ** ***

Searchability meta-data for an activity. Only applications that search other applications should need to use this class. See [Searchable Configuration](https://developer.android.com/guide/topics/search/searchable-config) for more information about declaring searchability meta-data for your application.
**See also:**

- `https://developer.android.com/reference/android/app/SearchManager#getSearchableInfo(android.content.ComponentName)`
- `https://developer.android.com/reference/android/app/SearchManager#getSearchablesInGlobalSearch()`

## Summary

### 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/app/SearchableInfo>` | `https://developer.android.com/reference/android/app/SearchableInfo#CREATOR` Support for parcelable and aidl operations. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/app/SearchableInfo#autoUrlDetect()() ` Checks whether this searchable activity has auto URL detection turned on. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getHintId()() ` Gets the resource id of the hint text. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getImeOptions()() ` Gets the input method options specified in the searchable attributes. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getInputType()() ` Gets the input type as specified in the searchable attributes. |
| ` https://developer.android.com/reference/android/content/ComponentName` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSearchActivity()() ` Gets the component name of the searchable activity. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSettingsDescriptionId()() ` Gets the resource id of the description string to use for this source in system search settings, or `0` if none has been specified. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSuggestAuthority()() ` Gets the search suggestion content provider authority. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSuggestIntentAction()() ` Gets the optional intent action for use with these suggestions. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSuggestIntentData()() ` Gets the optional intent data for use with these suggestions. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSuggestPackage()() ` Gets the name of the package where the suggestion provider lives, or `null`. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSuggestPath()() ` Gets the content provider path for obtaining search suggestions. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSuggestSelection()() ` Gets the selection for obtaining search suggestions. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getSuggestThreshold()() ` Gets the suggestion threshold. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getVoiceLanguageId()() ` Gets the resource id of the spoken language to recognize in voice search. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getVoiceLanguageModeId()() ` Gets the resource id of the voice search language model string. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getVoiceMaxResults()() ` The maximum number of voice recognition results to return. |
| ` int` | ` https://developer.android.com/reference/android/app/SearchableInfo#getVoicePromptTextId()() ` Gets the resource id of the voice prompt text string. |
| ` boolean` | ` https://developer.android.com/reference/android/app/SearchableInfo#getVoiceSearchEnabled()() ` Checks if the searchable activity wants the voice search button to be shown. |
| ` boolean` | ` https://developer.android.com/reference/android/app/SearchableInfo#getVoiceSearchLaunchRecognizer()() ` Checks if voice search should start in-app search. |
| ` boolean` | ` https://developer.android.com/reference/android/app/SearchableInfo#getVoiceSearchLaunchWebSearch()() ` Checks if voice search should start web search. |
| ` boolean` | ` https://developer.android.com/reference/android/app/SearchableInfo#queryAfterZeroResults()() ` Checks whether this searchable activity should be queried for suggestions if a prefix of the query has returned no results. |
| ` boolean` | ` https://developer.android.com/reference/android/app/SearchableInfo#shouldIncludeInGlobalSearch()() ` Checks whether the searchable should be included in global search. |
| ` boolean` | ` https://developer.android.com/reference/android/app/SearchableInfo#shouldRewriteQueryFromData()() ` Checks whether the text in the query field should come from the suggestion intent data. |
| ` boolean` | ` https://developer.android.com/reference/android/app/SearchableInfo#shouldRewriteQueryFromText()() ` Checks whether the text in the query field should come from the suggestion title. |
| ` void` | ` https://developer.android.com/reference/android/app/SearchableInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, 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.

## Fields

### CREATOR

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

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

Support for parcelable and aidl operations.

<br />

## Public methods

### autoUrlDetect

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

```
public boolean autoUrlDetect ()
```

Checks whether this searchable activity has auto URL detection turned on.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_autoUrlDetect`

### describeContents

Added in [API level 8](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` |

### getHintId

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

```
public int getHintId ()
```

Gets the resource id of the hint text. This must be read using the searchable Activity's resources.

<br />

| Returns ||
|---|---|
| `int` | A resource id, or `0` if no hint was specified. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_hint`

### getImeOptions

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

```
public int getImeOptions ()
```

Gets the input method options specified in the searchable attributes. This will default to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_GO` if not specified (which is appropriate for a search box).

<br />

| Returns ||
|---|---|
| `int` | the input type <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_imeOptions`

### getInputType

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

```
public int getInputType ()
```

Gets the input type as specified in the searchable attributes. This will default to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` if not specified (which is appropriate for free text input).

<br />

| Returns ||
|---|---|
| `int` | the input type <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_inputType`

### getSearchActivity

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

```
public ComponentName getSearchActivity ()
```

Gets the component name of the searchable activity.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ComponentName` | A component name, never `null`. <br /> |

### getSettingsDescriptionId

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

```
public int getSettingsDescriptionId ()
```

Gets the resource id of the description string to use for this source in system search settings, or `0` if none has been specified.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchSettingsDescription`

### getSuggestAuthority

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

```
public String getSuggestAuthority ()
```

Gets the search suggestion content provider authority.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The search suggestions authority, or `null` if not set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchSuggestAuthority`

### getSuggestIntentAction

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

```
public String getSuggestIntentAction ()
```

Gets the optional intent action for use with these suggestions. This is useful if all intents will have the same action (e.g. `https://developer.android.com/reference/android/content/Intent#ACTION_VIEW`) This can be overriden in any given suggestion using the column `https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_ACTION`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The default intent action, or `null` if not set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchSuggestIntentAction`

### getSuggestIntentData

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

```
public String getSuggestIntentData ()
```

Gets the optional intent data for use with these suggestions. This is useful if all intents will have similar data URIs, but you'll likely need to provide a specific ID as well via the column `https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_DATA_ID`, which will be appended to the intent data URI. This can be overriden in any given suggestion using the column `https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_DATA`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The default intent data, or `null` if not set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchSuggestIntentData`

### getSuggestPackage

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

```
public String getSuggestPackage ()
```

Gets the name of the package where the suggestion provider lives, or `null`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getSuggestPath

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

```
public String getSuggestPath ()
```

Gets the content provider path for obtaining search suggestions.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The suggestion path, or `null` if not set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchSuggestPath`

### getSuggestSelection

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

```
public String getSuggestSelection ()
```

Gets the selection for obtaining search suggestions.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchSuggestSelection`

### getSuggestThreshold

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

```
public int getSuggestThreshold ()
```

Gets the suggestion threshold.

<br />

| Returns ||
|---|---|
| `int` | The suggestion threshold, or `0` if not set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchSuggestThreshold`

### getVoiceLanguageId

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

```
public int getVoiceLanguageId ()
```

Gets the resource id of the spoken language to recognize in voice search.

<br />

| Returns ||
|---|---|
| `int` | A resource id, or `0` if no language was specified. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_voiceLanguage`

### getVoiceLanguageModeId

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

```
public int getVoiceLanguageModeId ()
```

Gets the resource id of the voice search language model string.

<br />

| Returns ||
|---|---|
| `int` | A resource id, or `0` if no language model was specified. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_voiceLanguageModel`

### getVoiceMaxResults

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

```
public int getVoiceMaxResults ()
```

The maximum number of voice recognition results to return.

<br />

| Returns ||
|---|---|
| `int` | the max results count, if specified in the searchable activity's metadata, or `0` if not specified. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_voiceMaxResults`

### getVoicePromptTextId

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

```
public int getVoicePromptTextId ()
```

Gets the resource id of the voice prompt text string.

<br />

| Returns ||
|---|---|
| `int` | A resource id, or `0` if no voice prompt text was specified. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_voicePromptText`

### getVoiceSearchEnabled

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

```
public boolean getVoiceSearchEnabled ()
```

Checks if the searchable activity wants the voice search button to be shown.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_voiceSearchMode`

### getVoiceSearchLaunchRecognizer

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

```
public boolean getVoiceSearchLaunchRecognizer ()
```

Checks if voice search should start in-app search.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_voiceSearchMode`

### getVoiceSearchLaunchWebSearch

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

```
public boolean getVoiceSearchLaunchWebSearch ()
```

Checks if voice search should start web search.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_voiceSearchMode`

### queryAfterZeroResults

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

```
public boolean queryAfterZeroResults ()
```

Checks whether this searchable activity should be queried for suggestions if a prefix of the query has returned no results.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_queryAfterZeroResults`

### shouldIncludeInGlobalSearch

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

```
public boolean shouldIncludeInGlobalSearch ()
```

Checks whether the searchable should be included in global search.

<br />

| Returns ||
|---|---|
| `boolean` | The value of the `https://developer.android.com/reference/android/R.styleable#Searchable_includeInGlobalSearch` attribute, or `false` if the attribute is not set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_includeInGlobalSearch`

### shouldRewriteQueryFromData

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

```
public boolean shouldRewriteQueryFromData ()
```

Checks whether the text in the query field should come from the suggestion intent data.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchMode`

### shouldRewriteQueryFromText

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

```
public boolean shouldRewriteQueryFromText ()
```

Checks whether the text in the query field should come from the suggestion title.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Searchable_searchMode`

### writeToParcel

Added in [API level 8](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`: 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` |