# SearchManager

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

# SearchManager

*** ** * ** ***

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

`
public


class
SearchManager
`  
`

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


``


implements

`[DialogInterface.OnCancelListener](https://developer.android.com/reference/android/content/DialogInterface.OnCancelListener)`,

`[DialogInterface.OnDismissListener](https://developer.android.com/reference/android/content/DialogInterface.OnDismissListener)`


`

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

<br />

*** ** * ** ***

This class provides access to the system search services.

In practice, you won't interact with this class directly, as search services are provided through methods in[Activity](https://developer.android.com/reference/android/app/Activity)and the[ACTION_SEARCH](https://developer.android.com/reference/android/content/Intent#ACTION_SEARCH)[Intent](https://developer.android.com/reference/android/content/Intent).

[Configuration.UI_MODE_TYPE_WATCH](https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_WATCH)does not support this system service.  

### Developer Guides

For more information about using the search dialog and adding search suggestions in your application, read the[Search](https://developer.android.com/guide/topics/search)developer guide.

<br />

## Summary

|                                                                                                                                                                             ### Nested classes                                                                                                                                                                             ||
|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` interface` | [SearchManager.OnCancelListener](https://developer.android.com/reference/android/app/SearchManager.OnCancelListener) See[SearchManager.setOnCancelListener](https://developer.android.com/reference/android/app/SearchManager#setOnCancelListener(android.app.SearchManager.OnCancelListener))for configuring your activity to monitor search UI state.      |
| ` interface` | [SearchManager.OnDismissListener](https://developer.android.com/reference/android/app/SearchManager.OnDismissListener) See[SearchManager.setOnDismissListener](https://developer.android.com/reference/android/app/SearchManager#setOnDismissListener(android.app.SearchManager.OnDismissListener))for configuring your activity to monitor search UI state. |

|                                                                                                                                                                                                                             ### Constants                                                                                                                                                                                                                             ||
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [ACTION_KEY](https://developer.android.com/reference/android/app/SearchManager#ACTION_KEY) Intent extra data key: Use this key with Intent.ACTION_SEARCH and[content.Intent.getIntExtra()](https://developer.android.com/reference/android/content/Intent#getIntExtra(java.lang.String,%20int))to obtain the keycode that the user used to trigger this query.                                    |
| [String](https://developer.android.com/reference/java/lang/String) | [ACTION_MSG](https://developer.android.com/reference/android/app/SearchManager#ACTION_MSG) Intent extra data key: Use this key with Intent.ACTION_SEARCH and[content.Intent.getStringExtra()](https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String))to obtain the action message that was defined for a particular search action key and/or suggestion. |
| [String](https://developer.android.com/reference/java/lang/String) | [APP_DATA](https://developer.android.com/reference/android/app/SearchManager#APP_DATA) Intent extra data key: Use this key with Intent.ACTION_SEARCH and[content.Intent.getBundleExtra()](https://developer.android.com/reference/android/content/Intent#getBundleExtra(java.lang.String))to obtain any additional app-specific data that was inserted by the activity that launched the search.  |
| [String](https://developer.android.com/reference/java/lang/String) | [CURSOR_EXTRA_KEY_IN_PROGRESS](https://developer.android.com/reference/android/app/SearchManager#CURSOR_EXTRA_KEY_IN_PROGRESS) Boolean extra data key for a suggestion provider to return in[Cursor.getExtras](https://developer.android.com/reference/android/database/Cursor#getExtras())to indicate that the search is not complete yet.                                                       |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_DATA_KEY](https://developer.android.com/reference/android/app/SearchManager#EXTRA_DATA_KEY) Intent extra data key: This key will be used for the extra populated by the[SUGGEST_COLUMN_INTENT_EXTRA_DATA](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_EXTRA_DATA)column.                                                                       |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_NEW_SEARCH](https://developer.android.com/reference/android/app/SearchManager#EXTRA_NEW_SEARCH) Boolean extra data key for[Intent.ACTION_WEB_SEARCH](https://developer.android.com/reference/android/content/Intent#ACTION_WEB_SEARCH)intents.                                                                                                                                             |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_SELECT_QUERY](https://developer.android.com/reference/android/app/SearchManager#EXTRA_SELECT_QUERY) Boolean extra data key for[INTENT_ACTION_GLOBAL_SEARCH](https://developer.android.com/reference/android/app/SearchManager#INTENT_ACTION_GLOBAL_SEARCH)intents.                                                                                                                         |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_WEB_SEARCH_PENDINGINTENT](https://developer.android.com/reference/android/app/SearchManager#EXTRA_WEB_SEARCH_PENDINGINTENT) Extra data key for[Intent.ACTION_WEB_SEARCH](https://developer.android.com/reference/android/content/Intent#ACTION_WEB_SEARCH).                                                                                                                                |
| `int`                                                              | [FLAG_QUERY_REFINEMENT](https://developer.android.com/reference/android/app/SearchManager#FLAG_QUERY_REFINEMENT) Flag to specify that the entry can be used for query refinement, i.e., the query text in the search field can be replaced with the text in this entry, when a query refinement icon is clicked.                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [INTENT_ACTION_GLOBAL_SEARCH](https://developer.android.com/reference/android/app/SearchManager#INTENT_ACTION_GLOBAL_SEARCH) Intent action for starting the global search activity.                                                                                                                                                                                                               |
| [String](https://developer.android.com/reference/java/lang/String) | [INTENT_ACTION_SEARCHABLES_CHANGED](https://developer.android.com/reference/android/app/SearchManager#INTENT_ACTION_SEARCHABLES_CHANGED) Intent action broadcasted to inform that the searchables list or default have changed.                                                                                                                                                                   |
| [String](https://developer.android.com/reference/java/lang/String) | [INTENT_ACTION_SEARCH_SETTINGS](https://developer.android.com/reference/android/app/SearchManager#INTENT_ACTION_SEARCH_SETTINGS) Intent action for starting the global search settings activity.                                                                                                                                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [INTENT_ACTION_SEARCH_SETTINGS_CHANGED](https://developer.android.com/reference/android/app/SearchManager#INTENT_ACTION_SEARCH_SETTINGS_CHANGED) Intent action broadcasted to inform that the search settings have changed in some way.                                                                                                                                                           |
| [String](https://developer.android.com/reference/java/lang/String) | [INTENT_ACTION_WEB_SEARCH_SETTINGS](https://developer.android.com/reference/android/app/SearchManager#INTENT_ACTION_WEB_SEARCH_SETTINGS) Intent action for starting a web search provider's settings activity.                                                                                                                                                                                    |
| [String](https://developer.android.com/reference/java/lang/String) | [INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED](https://developer.android.com/reference/android/app/SearchManager#INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED) Intent action to be broadcast to inform that the global search provider has changed.                                                                                                                                                             |
| `char`                                                             | [MENU_KEY](https://developer.android.com/reference/android/app/SearchManager#MENU_KEY) This is a shortcut definition for the default menu key to use for invoking search.                                                                                                                                                                                                                         |
| `int`                                                              | [MENU_KEYCODE](https://developer.android.com/reference/android/app/SearchManager#MENU_KEYCODE) This is a shortcut definition for the default menu key to use for invoking search.                                                                                                                                                                                                                 |
| [String](https://developer.android.com/reference/java/lang/String) | [QUERY](https://developer.android.com/reference/android/app/SearchManager#QUERY) Intent extra data key: Use this key with[content.Intent.getStringExtra()](https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String))to obtain the query string from Intent.ACTION_SEARCH.                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [SHORTCUT_MIME_TYPE](https://developer.android.com/reference/android/app/SearchManager#SHORTCUT_MIME_TYPE) MIME type for shortcut validation.                                                                                                                                                                                                                                                     |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_AUDIO_CHANNEL_CONFIG](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_AUDIO_CHANNEL_CONFIG) Column name for suggestions cursor.                                                                                                                                                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_CONTENT_TYPE](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_CONTENT_TYPE) Column name for suggestions cursor.                                                                                                                                                                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_DURATION](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_DURATION) Column name for suggestions cursor.                                                                                                                                                                                                                                          |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_FLAGS](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_FLAGS) Column name for suggestions cursor.                                                                                                                                                                                                                                                |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_FORMAT](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_FORMAT) Column name for suggestions cursor.                                                                                                                                                                                                                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_ICON_1](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_ICON_1) Column name for suggestions cursor.                                                                                                                                                                                                                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_ICON_2](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_ICON_2) Column name for suggestions cursor.                                                                                                                                                                                                                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_INTENT_ACTION](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_ACTION) Column name for suggestions cursor.                                                                                                                                                                                                                                |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_INTENT_DATA](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_DATA) Column name for suggestions cursor.                                                                                                                                                                                                                                    |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_INTENT_DATA_ID](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_DATA_ID) Column name for suggestions cursor.                                                                                                                                                                                                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_INTENT_EXTRA_DATA](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_EXTRA_DATA) Column name for suggestions cursor.                                                                                                                                                                                                                        |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_IS_LIVE](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_IS_LIVE) Column name for suggestions cursor.                                                                                                                                                                                                                                            |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_LAST_ACCESS_HINT](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_LAST_ACCESS_HINT) Column name for suggestions cursor.                                                                                                                                                                                                                          |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_PRODUCTION_YEAR](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_PRODUCTION_YEAR) Column name for suggestions cursor.                                                                                                                                                                                                                            |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_PURCHASE_PRICE](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_PURCHASE_PRICE) Column name for suggestions cursor.                                                                                                                                                                                                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_QUERY](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_QUERY) Column name for suggestions cursor.                                                                                                                                                                                                                                                |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_RATING_SCORE](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_RATING_SCORE) Column name for suggestions cursor.                                                                                                                                                                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_RATING_STYLE](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_RATING_STYLE) Column name for suggestions cursor.                                                                                                                                                                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_RENTAL_PRICE](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_RENTAL_PRICE) Column name for suggestions cursor.                                                                                                                                                                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_RESULT_CARD_IMAGE](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_RESULT_CARD_IMAGE) Column name for suggestions cursor.                                                                                                                                                                                                                        |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_SHORTCUT_ID](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_SHORTCUT_ID) Column name for suggestions cursor.                                                                                                                                                                                                                                    |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING) Column name for suggestions cursor.                                                                                                                                                                                                          |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_TEXT_1](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_TEXT_1) Column name for suggestions cursor.                                                                                                                                                                                                                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_TEXT_2](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_TEXT_2) Column name for suggestions cursor.                                                                                                                                                                                                                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_TEXT_2_URL](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_TEXT_2_URL) Column name for suggestions cursor.                                                                                                                                                                                                                                      |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_VIDEO_HEIGHT](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_VIDEO_HEIGHT) Column name for suggestions cursor.                                                                                                                                                                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_COLUMN_VIDEO_WIDTH](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_VIDEO_WIDTH) Column name for suggestions cursor.                                                                                                                                                                                                                                    |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_MIME_TYPE](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_MIME_TYPE) MIME type for suggestions data.                                                                                                                                                                                                                                                          |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_NEVER_MAKE_SHORTCUT](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_NEVER_MAKE_SHORTCUT) Column value for suggestion column[SUGGEST_COLUMN_SHORTCUT_ID](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_SHORTCUT_ID)when a suggestion should not be stored as a shortcut in global search.                                   |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_PARAMETER_LIMIT](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_PARAMETER_LIMIT) Query parameter added to suggestion queries to limit the number of suggestions returned.                                                                                                                                                                                     |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_URI_PATH_QUERY](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_URI_PATH_QUERY) Uri path for queried suggestions data.                                                                                                                                                                                                                                         |
| [String](https://developer.android.com/reference/java/lang/String) | [SUGGEST_URI_PATH_SHORTCUT](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_URI_PATH_SHORTCUT) Uri path for shortcut validation.                                                                                                                                                                                                                                        |
| [String](https://developer.android.com/reference/java/lang/String) | [USER_QUERY](https://developer.android.com/reference/android/app/SearchManager#USER_QUERY) Intent extra data key: Use this key with[content.Intent.getStringExtra()](https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String))to obtain the query string typed in by the user.                                                                             |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[ComponentName](https://developer.android.com/reference/android/content/ComponentName)                                                                   | ` `[getGlobalSearchActivity](https://developer.android.com/reference/android/app/SearchManager#getGlobalSearchActivity())`() ` Gets the name of the global search activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` `[SearchableInfo](https://developer.android.com/reference/android/app/SearchableInfo)                                                                     | ` `[getSearchableInfo](https://developer.android.com/reference/android/app/SearchManager#getSearchableInfo(android.content.ComponentName))`(`[ComponentName](https://developer.android.com/reference/android/content/ComponentName)` componentName) ` Gets information about a searchable activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` `[List](https://developer.android.com/reference/java/util/List)`<`[SearchableInfo](https://developer.android.com/reference/android/app/SearchableInfo)`>` | ` `[getSearchablesInGlobalSearch](https://developer.android.com/reference/android/app/SearchManager#getSearchablesInGlobalSearch())`() ` Returns a list of the searchable activities that can be included in global search.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                                                     | ` `[onCancel](https://developer.android.com/reference/android/app/SearchManager#onCancel(android.content.DialogInterface))`(`[DialogInterface](https://developer.android.com/reference/android/content/DialogInterface)` dialog) ` *This method is deprecated. This method is an obsolete internal implementation detail. Do not use.*                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                                                     | ` `[onDismiss](https://developer.android.com/reference/android/app/SearchManager#onDismiss(android.content.DialogInterface))`(`[DialogInterface](https://developer.android.com/reference/android/content/DialogInterface)` dialog) ` *This method is deprecated. This method is an obsolete internal implementation detail. Do not use.*                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                                                     | ` `[setOnCancelListener](https://developer.android.com/reference/android/app/SearchManager#setOnCancelListener(android.app.SearchManager.OnCancelListener))`(`[SearchManager.OnCancelListener](https://developer.android.com/reference/android/app/SearchManager.OnCancelListener)` listener) ` Set or clear the callback that will be invoked whenever the search UI is canceled.                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                                                     | ` `[setOnDismissListener](https://developer.android.com/reference/android/app/SearchManager#setOnDismissListener(android.app.SearchManager.OnDismissListener))`(`[SearchManager.OnDismissListener](https://developer.android.com/reference/android/app/SearchManager.OnDismissListener)` listener) ` Set or clear the callback that will be invoked whenever the search UI is dismissed.                                                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                                                     | ` `[startSearch](https://developer.android.com/reference/android/app/SearchManager#startSearch(java.lang.String,%20boolean,%20android.content.ComponentName,%20android.os.Bundle,%20boolean))`(`[String](https://developer.android.com/reference/java/lang/String)` initialQuery, boolean selectInitialQuery, `[ComponentName](https://developer.android.com/reference/android/content/ComponentName)` launchActivity, `[Bundle](https://developer.android.com/reference/android/os/Bundle)` appSearchData, boolean globalSearch) ` Launch search UI.                                                                                                                                                                                                                                   |
| ` void`                                                                                                                                                     | ` `[stopSearch](https://developer.android.com/reference/android/app/SearchManager#stopSearch())`() ` Terminate search UI.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                                                     | ` `[triggerSearch](https://developer.android.com/reference/android/app/SearchManager#triggerSearch(java.lang.String,%20android.content.ComponentName,%20android.os.Bundle))`(`[String](https://developer.android.com/reference/java/lang/String)` query, `[ComponentName](https://developer.android.com/reference/android/content/ComponentName)` launchActivity, `[Bundle](https://developer.android.com/reference/android/os/Bundle)` appSearchData) ` Similar to[startSearch(String, boolean, ComponentName, Bundle, boolean)](https://developer.android.com/reference/android/app/SearchManager#startSearch(java.lang.String,%20boolean,%20android.content.ComponentName,%20android.os.Bundle,%20boolean))but actually fires off the search query after invoking the search dialog. |

| ### 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.content.DialogInterface.OnCancelListener](https://developer.android.com/reference/android/content/DialogInterface.OnCancelListener)` ` |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` `[onCancel](https://developer.android.com/reference/android/content/DialogInterface.OnCancelListener#onCancel(android.content.DialogInterface))`(`[DialogInterface](https://developer.android.com/reference/android/content/DialogInterface)` dialog) ` This method will be invoked when the dialog is canceled. | ||
| From interface` `[android.content.DialogInterface.OnDismissListener](https://developer.android.com/reference/android/content/DialogInterface.OnDismissListener)` ` |------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` `[onDismiss](https://developer.android.com/reference/android/content/DialogInterface.OnDismissListener#onDismiss(android.content.DialogInterface))`(`[DialogInterface](https://developer.android.com/reference/android/content/DialogInterface)` dialog) ` This method will be invoked when the dialog is dismissed. | ||

## Constants

### ACTION_KEY

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

```
public static final String ACTION_KEY
```

Intent extra data key: Use this key with Intent.ACTION_SEARCH and[content.Intent.getIntExtra()](https://developer.android.com/reference/android/content/Intent#getIntExtra(java.lang.String,%20int))to obtain the keycode that the user used to trigger this query. It will be zero if the user simply pressed the "GO" button on the search UI. This is primarily used in conjunction with the keycode attribute in the actionkey element of your searchable.xml configuration file.

<br />

Constant Value: "action_key"  

### ACTION_MSG

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

```
public static final String ACTION_MSG
```

Intent extra data key: Use this key with Intent.ACTION_SEARCH and[content.Intent.getStringExtra()](https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String))to obtain the action message that was defined for a particular search action key and/or suggestion. It will be null if the search was launched by typing "enter", touching the "GO" button, or other means not involving any action key.

<br />

Constant Value: "action_msg"  

### APP_DATA

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

```
public static final String APP_DATA
```

Intent extra data key: Use this key with Intent.ACTION_SEARCH and[content.Intent.getBundleExtra()](https://developer.android.com/reference/android/content/Intent#getBundleExtra(java.lang.String))to obtain any additional app-specific data that was inserted by the activity that launched the search.

<br />

Constant Value: "app_data"  

### CURSOR_EXTRA_KEY_IN_PROGRESS

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

```
public static final String CURSOR_EXTRA_KEY_IN_PROGRESS
```

Boolean extra data key for a suggestion provider to return in[Cursor.getExtras](https://developer.android.com/reference/android/database/Cursor#getExtras())to indicate that the search is not complete yet. This can be used by the search UI to indicate that a search is in progress. The suggestion provider can return partial results this way and send a change notification on the cursor when more results are available.

<br />

Constant Value: "in_progress"  

### EXTRA_DATA_KEY

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

```
public static final String EXTRA_DATA_KEY
```

Intent extra data key: This key will be used for the extra populated by the[SUGGEST_COLUMN_INTENT_EXTRA_DATA](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_INTENT_EXTRA_DATA)column.

<br />

Constant Value: "intent_extra_data_key"  

### EXTRA_NEW_SEARCH

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

```
public static final String EXTRA_NEW_SEARCH
```

Boolean extra data key for[Intent.ACTION_WEB_SEARCH](https://developer.android.com/reference/android/content/Intent#ACTION_WEB_SEARCH)intents. If`true`, this search should open a new browser window, rather than using an existing one.

<br />

Constant Value: "new_search"  

### EXTRA_SELECT_QUERY

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

```
public static final String EXTRA_SELECT_QUERY
```

Boolean extra data key for[INTENT_ACTION_GLOBAL_SEARCH](https://developer.android.com/reference/android/app/SearchManager#INTENT_ACTION_GLOBAL_SEARCH)intents. If`true`, the initial query should be selected when the global search activity is started, so that the user can easily replace it with another query.

<br />

Constant Value: "select_query"  

### EXTRA_WEB_SEARCH_PENDINGINTENT

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

```
public static final String EXTRA_WEB_SEARCH_PENDINGINTENT
```

Extra data key for[Intent.ACTION_WEB_SEARCH](https://developer.android.com/reference/android/content/Intent#ACTION_WEB_SEARCH). If set, the value must be a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent). The search activity handling the[Intent.ACTION_WEB_SEARCH](https://developer.android.com/reference/android/content/Intent#ACTION_WEB_SEARCH)intent will fill in and launch the pending intent. The data URI will be filled in with an http or https URI, and[Browser.EXTRA_HEADERS](https://developer.android.com/reference/android/provider/Browser#EXTRA_HEADERS)may be filled in.

<br />

Constant Value: "web_search_pendingintent"  

### FLAG_QUERY_REFINEMENT

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

```
public static final int FLAG_QUERY_REFINEMENT
```

Flag to specify that the entry can be used for query refinement, i.e., the query text in the search field can be replaced with the text in this entry, when a query refinement icon is clicked. The suggestion list should show such a clickable icon beside the entry.

Use this flag as a bit-field for[SUGGEST_COLUMN_FLAGS](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_FLAGS).

<br />

Constant Value: 1 (0x00000001)  

### INTENT_ACTION_GLOBAL_SEARCH

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

```
public static final String INTENT_ACTION_GLOBAL_SEARCH
```

Intent action for starting the global search activity. The global search provider should handle this intent. Supported extra data keys:[QUERY](https://developer.android.com/reference/android/app/SearchManager#QUERY),[EXTRA_SELECT_QUERY](https://developer.android.com/reference/android/app/SearchManager#EXTRA_SELECT_QUERY),[APP_DATA](https://developer.android.com/reference/android/app/SearchManager#APP_DATA).

<br />

Constant Value: "android.search.action.GLOBAL_SEARCH"  

### INTENT_ACTION_SEARCHABLES_CHANGED

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

```
public static final String INTENT_ACTION_SEARCHABLES_CHANGED
```

Intent action broadcasted to inform that the searchables list or default have changed. Components should handle this intent if they cache any searchable data and wish to stay up to date on changes.

<br />

Constant Value: "android.search.action.SEARCHABLES_CHANGED"  

### INTENT_ACTION_SEARCH_SETTINGS

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

```
public static final String INTENT_ACTION_SEARCH_SETTINGS
```

Intent action for starting the global search settings activity. The global search provider should handle this intent.

<br />

Constant Value: "android.search.action.SEARCH_SETTINGS"  

### INTENT_ACTION_SEARCH_SETTINGS_CHANGED

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

```
public static final String INTENT_ACTION_SEARCH_SETTINGS_CHANGED
```

Intent action broadcasted to inform that the search settings have changed in some way. Either searchables have been enabled or disabled, or a different web search provider has been chosen.

<br />

Constant Value: "android.search.action.SETTINGS_CHANGED"  

### INTENT_ACTION_WEB_SEARCH_SETTINGS

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

```
public static final String INTENT_ACTION_WEB_SEARCH_SETTINGS
```

Intent action for starting a web search provider's settings activity. Web search providers should handle this intent if they have provider-specific settings to implement.

<br />

Constant Value: "android.search.action.WEB_SEARCH_SETTINGS"  

### INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED

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

```
public static final String INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED
```

Intent action to be broadcast to inform that the global search provider has changed.

<br />

Constant Value: "android.search.action.GLOBAL_SEARCH_ACTIVITY_CHANGED"  

### MENU_KEY

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

```
public static final char MENU_KEY
```

This is a shortcut definition for the default menu key to use for invoking search. See Menu.Item.setAlphabeticShortcut() for more information.

<br />

Constant Value: 115 (0x00000073)  

### MENU_KEYCODE

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

```
public static final int MENU_KEYCODE
```

This is a shortcut definition for the default menu key to use for invoking search. See Menu.Item.setAlphabeticShortcut() for more information.

<br />

Constant Value: 47 (0x0000002f)  

### QUERY

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

```
public static final String QUERY
```

Intent extra data key: Use this key with[content.Intent.getStringExtra()](https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String))to obtain the query string from Intent.ACTION_SEARCH.

<br />

Constant Value: "query"  

### SHORTCUT_MIME_TYPE

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

```
public static final String SHORTCUT_MIME_TYPE
```

MIME type for shortcut validation. You'll use this in your suggestions content provider in the getType() function.

<br />

Constant Value: "vnd.android.cursor.item/vnd.android.search.suggest"  

### SUGGEST_COLUMN_AUDIO_CHANNEL_CONFIG

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

```
public static final String SUGGEST_COLUMN_AUDIO_CHANNEL_CONFIG
```

Column name for suggestions cursor.*Optional.*If your content contains audio, you should provide this column to specify the audio channel configuration. The data in the column is string with format like "channels.subchannels" such as "1.0" or "5.1".

<br />

Constant Value: "suggest_audio_channel_config"  

### SUGGEST_COLUMN_CONTENT_TYPE

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

```
public static final String SUGGEST_COLUMN_CONTENT_TYPE
```

Column name for suggestions cursor.*Optional.*If your content is media type, you should provide this column so search app could understand more about your content. The data in the column must specify the MIME type of the content.

<br />

Constant Value: "suggest_content_type"  

### SUGGEST_COLUMN_DURATION

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

```
public static final String SUGGEST_COLUMN_DURATION
```

Column name for suggestions cursor.*Optional.*If your content is video or audio, you should provide this column to specify the duration of your content in milliseconds. The data in the column is of long type.

<br />

Constant Value: "suggest_duration"  

### SUGGEST_COLUMN_FLAGS

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

```
public static final String SUGGEST_COLUMN_FLAGS
```

Column name for suggestions cursor.*Optional.*This column is used to specify additional flags per item. Multiple flags can be specified.

Must be one of[FLAG_QUERY_REFINEMENT](https://developer.android.com/reference/android/app/SearchManager#FLAG_QUERY_REFINEMENT)or 0 to indicate no flags.

<br />

<br />

Constant Value: "suggest_flags"  

### SUGGEST_COLUMN_FORMAT

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

```
public static final String SUGGEST_COLUMN_FORMAT
```

Column name for suggestions cursor.*Unused - can be null or column can be omitted.*

<br />

Constant Value: "suggest_format"  

### SUGGEST_COLUMN_ICON_1

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

```
public static final String SUGGEST_COLUMN_ICON_1
```

Column name for suggestions cursor.*Optional.*If your cursor includes this column, then all suggestions will be provided in a format that includes space for two small icons, one at the left and one at the right of each suggestion. The data in the column must be a resource ID of a drawable, or a URI in one of the following formats:

- content ([ContentResolver.SCHEME_CONTENT](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT))
- android.resource ([ContentResolver.SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_ANDROID_RESOURCE))
- file ([ContentResolver.SCHEME_FILE](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_FILE))

See[ContentResolver.openAssetFileDescriptor(Uri, String)](https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String))for more information on these schemes.

<br />

<br />

Constant Value: "suggest_icon_1"  

### SUGGEST_COLUMN_ICON_2

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

```
public static final String SUGGEST_COLUMN_ICON_2
```

Column name for suggestions cursor.*Optional.*If your cursor includes this column, then all suggestions will be provided in a format that includes space for two small icons, one at the left and one at the right of each suggestion. The data in the column must be a resource ID of a drawable, or a URI in one of the following formats:

- content ([ContentResolver.SCHEME_CONTENT](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT))
- android.resource ([ContentResolver.SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_ANDROID_RESOURCE))
- file ([ContentResolver.SCHEME_FILE](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_FILE))

See[ContentResolver.openAssetFileDescriptor(Uri, String)](https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String))for more information on these schemes.

<br />

<br />

Constant Value: "suggest_icon_2"  

### SUGGEST_COLUMN_INTENT_ACTION

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

```
public static final String SUGGEST_COLUMN_INTENT_ACTION
```

Column name for suggestions cursor.*Optional.* If this column exists*and* this element exists at the given row, this is the action that will be used when forming the suggestion's intent. If the element is not provided, the action will be taken from the android:searchSuggestIntentAction field in your XML metadata.*At least one of these must be present for the suggestion to generate an intent.*Note: If your action is the same for all suggestions, it is more efficient to specify it using XML metadata and omit it from the cursor.

<br />

Constant Value: "suggest_intent_action"  

### SUGGEST_COLUMN_INTENT_DATA

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

```
public static final String SUGGEST_COLUMN_INTENT_DATA
```

Column name for suggestions cursor.*Optional.* If this column exists*and*this element exists at the given row, this is the data that will be used when forming the suggestion's intent. If the element is not provided, the data will be taken from the android:searchSuggestIntentData field in your XML metadata. If neither source is provided, the Intent's data field will be null. Note: If your data is the same for all suggestions, or can be described using a constant part and a specific ID, it is more efficient to specify it using XML metadata and omit it from the cursor.

<br />

Constant Value: "suggest_intent_data"  

### SUGGEST_COLUMN_INTENT_DATA_ID

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

```
public static final String SUGGEST_COLUMN_INTENT_DATA_ID
```

Column name for suggestions cursor.*Optional.* If this column exists*and*this element exists at the given row, then "/" and this value will be appended to the data field in the Intent. This should only be used if the data field has already been set to an appropriate base string.

<br />

Constant Value: "suggest_intent_data_id"  

### SUGGEST_COLUMN_INTENT_EXTRA_DATA

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

```
public static final String SUGGEST_COLUMN_INTENT_EXTRA_DATA
```

Column name for suggestions cursor.*Optional.* If this column exists*and* this element exists at the given row, this is the data that will be used when forming the suggestion's intent. If not provided, the Intent's extra data field will be null. This column allows suggestions to provide additional arbitrary data which will be included as an extra under the key[EXTRA_DATA_KEY](https://developer.android.com/reference/android/app/SearchManager#EXTRA_DATA_KEY).

<br />

Constant Value: "suggest_intent_extra_data"  

### SUGGEST_COLUMN_IS_LIVE

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

```
public static final String SUGGEST_COLUMN_IS_LIVE
```

Column name for suggestions cursor.*Optional.*If your content is media type, you should provide this column to specify whether your content is live media such as live video or live audio. The value in the column is of integer type with value of either 0 indicating non-live content or 1 indicating live content.

<br />

Constant Value: "suggest_is_live"  

### SUGGEST_COLUMN_LAST_ACCESS_HINT

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

```
public static final String SUGGEST_COLUMN_LAST_ACCESS_HINT
```

Column name for suggestions cursor.*Optional.* This column may be used to specify the time in[System.currentTImeMillis()](https://developer.android.com/reference/java/lang/System#currentTimeMillis())(wall time in UTC) when an item was last accessed within the results-providing application. If set, this may be used to show more-recently-used items first.

<br />

Constant Value: "suggest_last_access_hint"  

### SUGGEST_COLUMN_PRODUCTION_YEAR

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

```
public static final String SUGGEST_COLUMN_PRODUCTION_YEAR
```

Column name for suggestions cursor.*Optional.*If your content is video or audio and has a known production year, you should provide this column to specify the production year of your content. The data in the column is of integer type.

<br />

Constant Value: "suggest_production_year"  

### SUGGEST_COLUMN_PURCHASE_PRICE

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

```
public static final String SUGGEST_COLUMN_PURCHASE_PRICE
```

Column name for suggestions cursor.*Optional.*If your content is purchasable, you should provide this column to specify the displayable string representation of the purchase price of your content including the currency and the amount. If it's free, you should provide localized string to specify that it's free. This column can be omitted if the content is not applicable to purchase.

<br />

Constant Value: "suggest_purchase_price"  

### SUGGEST_COLUMN_QUERY

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

```
public static final String SUGGEST_COLUMN_QUERY
```

Column name for suggestions cursor.*Required if action is[ACTION_SEARCH](https://developer.android.com/reference/android/content/Intent#ACTION_SEARCH), optional otherwise.* If this column exists*and*this element exists at the given row, this is the data that will be used when forming the suggestion's query.

<br />

Constant Value: "suggest_intent_query"  

### SUGGEST_COLUMN_RATING_SCORE

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

```
public static final String SUGGEST_COLUMN_RATING_SCORE
```

Column name for suggestions cursor.*Optional.* If your content has a rating, you should provide this column to specify the rating score of your content. The data in the column is of float type. See[Rating](https://developer.android.com/reference/android/media/Rating)about valid rating scores for each rating style.

<br />

Constant Value: "suggest_rating_score"  

### SUGGEST_COLUMN_RATING_STYLE

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

```
public static final String SUGGEST_COLUMN_RATING_STYLE
```

Column name for suggestions cursor.*Optional.* If your content has a rating, you should provide this column to specify the rating style of your content. The data in the column must be one of the constant values specified in[Rating](https://developer.android.com/reference/android/media/Rating)

<br />

Constant Value: "suggest_rating_style"  

### SUGGEST_COLUMN_RENTAL_PRICE

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

```
public static final String SUGGEST_COLUMN_RENTAL_PRICE
```

Column name for suggestions cursor.*Optional.*If your content is rentable, you should provide this column to specify the displayable string representation of the rental price of your content including the currency and the amount. If it's free, you should provide localized string to specify that it's free. This column can be omitted if the content is not applicable to rent.

<br />

Constant Value: "suggest_rental_price"  

### SUGGEST_COLUMN_RESULT_CARD_IMAGE

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

```
public static final String SUGGEST_COLUMN_RESULT_CARD_IMAGE
```

Column name for suggestions cursor.*Optional.*If your cursor includes this column, then the image will be displayed when forming the suggestion. The suggested dimension for the image is 270x400 px for portrait mode and 400x225 px for landscape mode. The data in the column must be a resource ID of a drawable, or a URI in one of the following formats:

- content ([ContentResolver.SCHEME_CONTENT](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT))
- android.resource ([ContentResolver.SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_ANDROID_RESOURCE))
- file ([ContentResolver.SCHEME_FILE](https://developer.android.com/reference/android/content/ContentResolver#SCHEME_FILE))

See[ContentResolver.openAssetFileDescriptor(Uri, String)](https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String))for more information on these schemes.

<br />

<br />

Constant Value: "suggest_result_card_image"  

### SUGGEST_COLUMN_SHORTCUT_ID

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

```
public static final String SUGGEST_COLUMN_SHORTCUT_ID
```

Column name for suggestions cursor.*Optional.* This column is used to indicate whether a search suggestion should be stored as a shortcut, and whether it should be refreshed. If missing, the result will be stored as a shortcut and never validated. If set to[SUGGEST_NEVER_MAKE_SHORTCUT](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_NEVER_MAKE_SHORTCUT), the result will not be stored as a shortcut. Otherwise, the shortcut id will be used to check back for an up to date suggestion using[SUGGEST_URI_PATH_SHORTCUT](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_URI_PATH_SHORTCUT).

<br />

Constant Value: "suggest_shortcut_id"  

### SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING

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

```
public static final String SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING
```

Column name for suggestions cursor.*Optional.*This column is used to specify that a spinner should be shown in lieu of an icon2 while the shortcut of this suggestion is being refreshed.

<br />

Constant Value: "suggest_spinner_while_refreshing"  

### SUGGEST_COLUMN_TEXT_1

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

```
public static final String SUGGEST_COLUMN_TEXT_1
```

Column name for suggestions cursor.*Required.*This is the primary line of text that will be presented to the user as the suggestion.

<br />

Constant Value: "suggest_text_1"  

### SUGGEST_COLUMN_TEXT_2

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

```
public static final String SUGGEST_COLUMN_TEXT_2
```

Column name for suggestions cursor.*Optional.*If your cursor includes this column, then all suggestions will be provided in a two-line format. The second line of text is in a much smaller appearance.

<br />

Constant Value: "suggest_text_2"  

### SUGGEST_COLUMN_TEXT_2_URL

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

```
public static final String SUGGEST_COLUMN_TEXT_2_URL
```

Column name for suggestions cursor.*Optional.* This is a URL that will be shown as the second line of text instead of[SUGGEST_COLUMN_TEXT_2](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_TEXT_2). This is a separate column so that the search UI knows to display the text as a URL, e.g. by using a different color. If this column is absent, or has the value`null`,[SUGGEST_COLUMN_TEXT_2](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_TEXT_2)will be used instead.

<br />

Constant Value: "suggest_text_2_url"  

### SUGGEST_COLUMN_VIDEO_HEIGHT

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

```
public static final String SUGGEST_COLUMN_VIDEO_HEIGHT
```

Column name for suggestions cursor.*Optional.*If your content is video, you should provide this column to specify the number of horizontal lines. The data in the column is of integer type.

<br />

Constant Value: "suggest_video_height"  

### SUGGEST_COLUMN_VIDEO_WIDTH

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

```
public static final String SUGGEST_COLUMN_VIDEO_WIDTH
```

Column name for suggestions cursor.*Optional.*If your content is video, you should provide this column to specify the number of vertical lines. The data in the column is of integer type.

<br />

Constant Value: "suggest_video_width"  

### SUGGEST_MIME_TYPE

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

```
public static final String SUGGEST_MIME_TYPE
```

MIME type for suggestions data. You'll use this in your suggestions content provider in the getType() function.

<br />

Constant Value: "vnd.android.cursor.dir/vnd.android.search.suggest"  

### SUGGEST_NEVER_MAKE_SHORTCUT

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

```
public static final String SUGGEST_NEVER_MAKE_SHORTCUT
```

Column value for suggestion column[SUGGEST_COLUMN_SHORTCUT_ID](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_SHORTCUT_ID)when a suggestion should not be stored as a shortcut in global search.

<br />

Constant Value: "_-1"  

### SUGGEST_PARAMETER_LIMIT

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

```
public static final String SUGGEST_PARAMETER_LIMIT
```

Query parameter added to suggestion queries to limit the number of suggestions returned. This limit is only advisory and suggestion providers may chose to ignore it.

<br />

Constant Value: "limit"  

### SUGGEST_URI_PATH_QUERY

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

```
public static final String SUGGEST_URI_PATH_QUERY
```

Uri path for queried suggestions data. This is the path that the search manager will use when querying your content provider for suggestions data based on user input (e.g. looking for partial matches). Typically you'll use this with a URI matcher.

<br />

Constant Value: "search_suggest_query"  

### SUGGEST_URI_PATH_SHORTCUT

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

```
public static final String SUGGEST_URI_PATH_SHORTCUT
```

Uri path for shortcut validation. This is the path that the search manager will use when querying your content provider to refresh a shortcutted suggestion result and to check if it is still valid. When asked, a source may return an up to date result, or no result. No result indicates the shortcut refers to a no longer valid sugggestion.

<br />

**See also:**

- [SUGGEST_COLUMN_SHORTCUT_ID](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_SHORTCUT_ID)

Constant Value: "search_suggest_shortcut"  

### USER_QUERY

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

```
public static final String USER_QUERY
```

Intent extra data key: Use this key with[content.Intent.getStringExtra()](https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String))to obtain the query string typed in by the user. This may be different from the value of[QUERY](https://developer.android.com/reference/android/app/SearchManager#QUERY)if the intent is the result of selecting a suggestion. In that case,[QUERY](https://developer.android.com/reference/android/app/SearchManager#QUERY)will contain the value of[SUGGEST_COLUMN_QUERY](https://developer.android.com/reference/android/app/SearchManager#SUGGEST_COLUMN_QUERY)for the suggestion, and[USER_QUERY](https://developer.android.com/reference/android/app/SearchManager#USER_QUERY)will contain the string typed by the user.

<br />

Constant Value: "user_query"

## Public methods

### getGlobalSearchActivity

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

```
public ComponentName getGlobalSearchActivity ()
```

Gets the name of the global search activity.

<br />

|                                            Returns                                             ||
|----------------------------------------------------------------------------------------|--------|
| [ComponentName](https://developer.android.com/reference/android/content/ComponentName) | <br /> |

### getSearchableInfo

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

```
public SearchableInfo getSearchableInfo (ComponentName componentName)
```

Gets information about a searchable activity.

<br />

|                                        Parameters                                        ||
|-----------------|-------------------------------------------------------------------------|
| `componentName` | `ComponentName`: The activity to get searchable information for. <br /> |

|                                                                                      Returns                                                                                       ||
|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| [SearchableInfo](https://developer.android.com/reference/android/app/SearchableInfo) | Searchable information, or`null`if the activity does not exist, or is not searchable. <br /> |

### getSearchablesInGlobalSearch

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

```
public List<SearchableInfo> getSearchablesInGlobalSearch ()
```

Returns a list of the searchable activities that can be included in global search.

<br />

|                                                                                                                                                             Returns                                                                                                                                                              ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [List](https://developer.android.com/reference/java/util/List)`<`[SearchableInfo](https://developer.android.com/reference/android/app/SearchableInfo)`>` | a list containing searchable information for all searchable activities that have the`android:includeInGlobalSearch`attribute set in their searchable meta-data. <br /> |

### onCancel

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

```
public void onCancel (DialogInterface dialog)
```

<br />

**This method is deprecated.**   
This method is an obsolete internal implementation detail. Do not use.

This method will be invoked when the dialog is canceled.

<br />

|                                           Parameters                                            ||
|----------|---------------------------------------------------------------------------------------|
| `dialog` | `DialogInterface`: the dialog that was canceled will be passed into the method <br /> |

### onDismiss

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

```
public void onDismiss (DialogInterface dialog)
```

<br />

**This method is deprecated.**   
This method is an obsolete internal implementation detail. Do not use.

This method will be invoked when the dialog is dismissed.

<br />

|                                            Parameters                                            ||
|----------|----------------------------------------------------------------------------------------|
| `dialog` | `DialogInterface`: the dialog that was dismissed will be passed into the method <br /> |

### setOnCancelListener

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

```
public void setOnCancelListener (SearchManager.OnCancelListener listener)
```

Set or clear the callback that will be invoked whenever the search UI is canceled.

[Configuration.UI_MODE_TYPE_TELEVISION](https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_TELEVISION)does not support this method.

<br />

|                                                                                   Parameters                                                                                   ||
|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `listener` | `SearchManager.OnCancelListener`: The[OnCancelListener](https://developer.android.com/reference/android/app/SearchManager.OnCancelListener)to use, or null. <br /> |

### setOnDismissListener

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

```
public void setOnDismissListener (SearchManager.OnDismissListener listener)
```

Set or clear the callback that will be invoked whenever the search UI is dismissed.

[Configuration.UI_MODE_TYPE_TELEVISION](https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_TELEVISION)does not support this method.

<br />

|                                                                                    Parameters                                                                                     ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `listener` | `SearchManager.OnDismissListener`: The[OnDismissListener](https://developer.android.com/reference/android/app/SearchManager.OnDismissListener)to use, or null. <br /> |

### startSearch

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

```
public void startSearch (String initialQuery, 
                boolean selectInitialQuery, 
                ComponentName launchActivity, 
                Bundle appSearchData, 
                boolean globalSearch)
```

Launch search UI.

The search manager will open a search widget in an overlapping window, and the underlying activity may be obscured. The search entry state will remain in effect until one of the following events:

- The user completes the search. In most cases this will launch a search intent.
- The user uses the back, home, or other keys to exit the search.
- The application calls the[stopSearch()](https://developer.android.com/reference/android/app/SearchManager#stopSearch())method, which will hide the search window and return focus to the activity from which it was launched.
- Most applications will*not* use this interface to invoke search. The primary method for invoking search is to call[Activity.onSearchRequested()](https://developer.android.com/reference/android/app/Activity#onSearchRequested())or[Activity.startSearch()](https://developer.android.com/reference/android/app/Activity#startSearch(java.lang.String,%20boolean,%20android.os.Bundle,%20boolean)).

|                                                                                                                                                                                                                                                  Parameters                                                                                                                                                                                                                                                   ||
|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `initialQuery`       | `String`: A search string can be pre-entered here, but this is typically null or empty. <br />                                                                                                                                                                                                                                                                                                                                                                                          |
| `selectInitialQuery` | `boolean`: If true, the initial query will be preselected, which means that any further typing will replace it. This is useful for cases where an entire pre-formed query is being inserted. If false, the selection point will be placed at the end of the inserted query. This is useful when the inserted query is text that the user entered, and the user would expect to be able to keep typing.*This parameter is only meaningful if initialQuery is a non-empty string.* <br /> |
| `launchActivity`     | `ComponentName`: The ComponentName of the activity that has launched this search. <br />                                                                                                                                                                                                                                                                                                                                                                                                |
| `appSearchData`      | `Bundle`: An application can insert application-specific context here, in order to improve quality or specificity of its own searches. This data will be returned with SEARCH intent(s). Null if no extra data is required. <br />                                                                                                                                                                                                                                                      |
| `globalSearch`       | `boolean`: If false, this will only launch the search that has been specifically defined by the application (which is usually defined as a local search). If no default search is defined in the current application or activity, global search will be launched. If true, this will always launch a platform-global (e.g. web-based) search instead. <br />                                                                                                                            |

**See also:**

- [Activity.onSearchRequested()](https://developer.android.com/reference/android/app/Activity#onSearchRequested())
- [stopSearch()](https://developer.android.com/reference/android/app/SearchManager#stopSearch())  

### stopSearch

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

```
public void stopSearch ()
```

Terminate search UI.

Typically the user will terminate the search UI by launching a search or by canceling. This function allows the underlying application or activity to cancel the search prematurely (for any reason).

This function can be safely called at any time (even if no search is active.)

[Configuration.UI_MODE_TYPE_TELEVISION](https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_TELEVISION)does not support this method.

<br />

**See also:**

- [startSearch(String, boolean, ComponentName, Bundle, boolean)](https://developer.android.com/reference/android/app/SearchManager#startSearch(java.lang.String,%20boolean,%20android.content.ComponentName,%20android.os.Bundle,%20boolean))  

### triggerSearch

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

```
public void triggerSearch (String query, 
                ComponentName launchActivity, 
                Bundle appSearchData)
```

Similar to[startSearch(String, boolean, ComponentName, Bundle, boolean)](https://developer.android.com/reference/android/app/SearchManager#startSearch(java.lang.String,%20boolean,%20android.content.ComponentName,%20android.os.Bundle,%20boolean))but actually fires off the search query after invoking the search dialog. Made available for testing purposes.

<br />

|                                                                                                                      Parameters                                                                                                                      ||
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `query`          | `String`: The query to trigger. If empty, request will be ignored. <br />                                                                                                                                                          |
| `launchActivity` | `ComponentName`: The ComponentName of the activity that has launched this search. <br />                                                                                                                                           |
| `appSearchData`  | `Bundle`: An application can insert application-specific context here, in order to improve quality or specificity of its own searches. This data will be returned with SEARCH intent(s). Null if no extra data is required. <br /> |

**See also:**

- [startSearch(String, boolean, ComponentName, Bundle, boolean)](https://developer.android.com/reference/android/app/SearchManager#startSearch(java.lang.String,%20boolean,%20android.content.ComponentName,%20android.os.Bundle,%20boolean))