SearchableInfo
class SearchableInfo : Parcelable
| kotlin.Any | |
| ↳ | android.app.SearchableInfo | 
Searchability meta-data for an activity. Only applications that search other applications should need to use this class. See Searchable Configuration for more information about declaring searchability meta-data for your application.
Summary
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Boolean | Checks whether this searchable activity has auto URL detection turned on. | 
| Int | |
| Int | Gets the resource id of the hint text. | 
| Int | Gets the input method options specified in the searchable attributes. | 
| Int | Gets the input type as specified in the searchable attributes. | 
| ComponentName! | Gets the component name of the searchable activity. | 
| Int | Gets the resource id of the description string to use for this source in system search settings, or  | 
| String! | Gets the search suggestion content provider authority. | 
| String! | Gets the optional intent action for use with these suggestions. | 
| String! | Gets the optional intent data for use with these suggestions. | 
| String! | Gets the name of the package where the suggestion provider lives, or  | 
| String! | Gets the content provider path for obtaining search suggestions. | 
| String! | Gets the selection for obtaining search suggestions. | 
| Int | Gets the suggestion threshold. | 
| Int | Gets the resource id of the spoken language to recognize in voice search. | 
| Int | Gets the resource id of the voice search language model string. | 
| Int | The maximum number of voice recognition results to return. | 
| Int | Gets the resource id of the voice prompt text string. | 
| Boolean | Checks if the searchable activity wants the voice search button to be shown. | 
| Boolean | Checks if voice search should start in-app search. | 
| Boolean | Checks if voice search should start web search. | 
| Boolean | Checks whether this searchable activity should be queried for suggestions if a prefix of the query has returned no results. | 
| Boolean | Checks whether the searchable should be included in global search. | 
| Boolean | Checks whether the text in the query field should come from the suggestion intent data. | 
| Boolean | Checks whether the text in the query field should come from the suggestion title. | 
| Unit | writeToParcel(dest: Parcel, flags: Int) | 
| Properties | |
|---|---|
| static Parcelable.Creator<SearchableInfo!> | Support for parcelable and aidl operations. | 
Public methods
autoUrlDetect
fun autoUrlDetect(): Boolean
Checks whether this searchable activity has auto URL detection turned on.
describeContents
fun describeContents(): Int
| Return | |
|---|---|
| Int | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0orandroid.os.Parcelable#CONTENTS_FILE_DESCRIPTOR | 
getHintId
fun getHintId(): Int
Gets the resource id of the hint text. This must be read using the searchable Activity's resources.
| Return | |
|---|---|
| Int | A resource id, or 0if no hint was specified. | 
See Also
getImeOptions
fun getImeOptions(): Int
Gets the input method options specified in the searchable attributes. This will default to EditorInfo.IME_ACTION_GO if not specified (which is appropriate for a search box).
| Return | |
|---|---|
| Int | the input type | 
getInputType
fun getInputType(): Int
Gets the input type as specified in the searchable attributes. This will default to InputType.TYPE_CLASS_TEXT if not specified (which is appropriate for free text input).
| Return | |
|---|---|
| Int | the input type | 
getSearchActivity
fun getSearchActivity(): ComponentName!
Gets the component name of the searchable activity.
| Return | |
|---|---|
| ComponentName! | A component name, never null. | 
getSettingsDescriptionId
fun getSettingsDescriptionId(): Int
Gets the resource id of the description string to use for this source in system search settings, or 0 if none has been specified.
getSuggestAuthority
fun getSuggestAuthority(): String!
Gets the search suggestion content provider authority.
| Return | |
|---|---|
| String! | The search suggestions authority, or nullif not set. | 
getSuggestIntentAction
fun getSuggestIntentAction(): String!
Gets the optional intent action for use with these suggestions. This is useful if all intents will have the same action (e.g. android.content.Intent#ACTION_VIEW) This can be overriden in any given suggestion using the column SearchManager.SUGGEST_COLUMN_INTENT_ACTION.
| Return | |
|---|---|
| String! | The default intent action, or nullif not set. | 
getSuggestIntentData
fun getSuggestIntentData(): String!
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 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 SearchManager.SUGGEST_COLUMN_INTENT_DATA.
| Return | |
|---|---|
| String! | The default intent data, or nullif not set. | 
getSuggestPackage
fun getSuggestPackage(): String!
Gets the name of the package where the suggestion provider lives, or null.
getSuggestPath
fun getSuggestPath(): String!
Gets the content provider path for obtaining search suggestions.
| Return | |
|---|---|
| String! | The suggestion path, or nullif not set. | 
getSuggestSelection
fun getSuggestSelection(): String!
Gets the selection for obtaining search suggestions.
getSuggestThreshold
fun getSuggestThreshold(): Int
Gets the suggestion threshold.
| Return | |
|---|---|
| Int | The suggestion threshold, or 0if not set. | 
getVoiceLanguageId
fun getVoiceLanguageId(): Int
Gets the resource id of the spoken language to recognize in voice search.
| Return | |
|---|---|
| Int | A resource id, or 0if no language was specified. | 
getVoiceLanguageModeId
fun getVoiceLanguageModeId(): Int
Gets the resource id of the voice search language model string.
| Return | |
|---|---|
| Int | A resource id, or 0if no language model was specified. | 
getVoiceMaxResults
fun getVoiceMaxResults(): Int
The maximum number of voice recognition results to return.
| Return | |
|---|---|
| Int | the max results count, if specified in the searchable activity's metadata, or 0if not specified. | 
getVoicePromptTextId
fun getVoicePromptTextId(): Int
Gets the resource id of the voice prompt text string.
| Return | |
|---|---|
| Int | A resource id, or 0if no voice prompt text was specified. | 
getVoiceSearchEnabled
fun getVoiceSearchEnabled(): Boolean
Checks if the searchable activity wants the voice search button to be shown.
getVoiceSearchLaunchRecognizer
fun getVoiceSearchLaunchRecognizer(): Boolean
Checks if voice search should start in-app search.
getVoiceSearchLaunchWebSearch
fun getVoiceSearchLaunchWebSearch(): Boolean
Checks if voice search should start web search.
queryAfterZeroResults
fun queryAfterZeroResults(): Boolean
Checks whether this searchable activity should be queried for suggestions if a prefix of the query has returned no results.
shouldIncludeInGlobalSearch
fun shouldIncludeInGlobalSearch(): Boolean
Checks whether the searchable should be included in global search.
| Return | |
|---|---|
| Boolean | The value of the android.R.styleable#Searchable_includeInGlobalSearchattribute, orfalseif the attribute is not set. | 
shouldRewriteQueryFromData
fun shouldRewriteQueryFromData(): Boolean
Checks whether the text in the query field should come from the suggestion intent data.
shouldRewriteQueryFromText
fun shouldRewriteQueryFromText(): Boolean
Checks whether the text in the query field should come from the suggestion title.
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
| Parameters | |
|---|---|
| dest | Parcel: The Parcel in which the object should be written. This value cannot be null. | 
| flags | Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either0or a combination ofandroid.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SearchableInfo!>
Support for parcelable and aidl operations.
