Android Guides | Samples

Android.App.SearchManager Class

This class provides access to the system search services.

See Also: SearchManager

Syntax

[Android.Runtime.Register("android/app/SearchManager", DoNotGenerateAcw=true)]
public class SearchManager : Object, IDialogInterfaceOnCancelListener, IDialogInterfaceOnDismissListener, IDisposable

Remarks

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 and the Intent.ActionSearchIntent. If you do require direct access to the SearchManager, do not instantiate this class directly. Instead, retrieve it through Context.GetSystemService(String).

Developer Guides

For more information about using the search dialog and adding search suggestions in your application, read the Search developer guide.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.App.SearchManager are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
ActionKeyString. Intent extra data key: Use this key with Intent.
const
ActionMsgString. Intent extra data key: Use this key with Intent.
const
AppDataString. Intent extra data key: Use this key with Intent.
const
CursorExtraKeyInProgressString. Boolean extra data key for a suggestion provider to return in ICursor.Extras to indicate that the search is not complete yet.
const
ExtraDataKeyString. Intent extra data key: This key will be used for the extra populated by the SearchManager.SuggestColumnIntentExtraData column.
const
ExtraNewSearchString. Boolean extra data key for Intent.ActionWebSearch intents.
const
ExtraSelectQueryString. Boolean extra data key for SearchManager.IntentActionGlobalSearch intents.
const
ExtraWebSearchPendingintentString. Extra data key for Intent.ActionWebSearch.
const
FlagQueryRefinementInt32 (1). 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.
const
IntentActionGlobalSearchString. Intent action for starting the global search activity.
const
IntentActionSearchablesChangedString. Intent action broadcasted to inform that the searchables list or default have changed.
const
IntentActionSearchSettingsString. Intent action for starting the global search settings activity.
const
IntentActionSearchSettingsChangedString. Intent action broadcasted to inform that the search settings have changed in some way.
const
IntentActionWebSearchSettingsString. Intent action for starting a web search provider's settings activity.
const
IntentGlobalSearchActivityChangedString. Intent action to be broadcast to inform that the global search provider has changed.
const
MenuKeyChar. This is a shortcut definition for the default menu key to use for invoking search.
const
MenuKeycodeInt32 (47). This is a shortcut definition for the default menu key to use for invoking search.
const
QueryString. Intent extra data key: Use this key with Intent.GetStringExtra(String) to obtain the query string from Intent.
const
ShortcutMimeTypeString. MIME type for shortcut validation.
const
SuggestColumnAudioChannelConfigString. Column name for suggestions cursor.
const
SuggestColumnContentTypeString. Column name for suggestions cursor.
const
SuggestColumnDurationString. Column name for suggestions cursor.
const
SuggestColumnFlagsString. Column name for suggestions cursor.
const
SuggestColumnFormatString. Column name for suggestions cursor.
const
SuggestColumnIcon1String. Column name for suggestions cursor.
const
SuggestColumnIcon2String. Column name for suggestions cursor.
const
SuggestColumnIntentActionString. Column name for suggestions cursor.
const
SuggestColumnIntentDataString. Column name for suggestions cursor.
const
SuggestColumnIntentDataIdString. Column name for suggestions cursor.
const
SuggestColumnIntentExtraDataString. Column name for suggestions cursor.
const
SuggestColumnIsLiveString. Column name for suggestions cursor.
const
SuggestColumnLastAccessHintString. Column name for suggestions cursor.
const
SuggestColumnProductionYearString. Column name for suggestions cursor.
const
SuggestColumnPurchasePriceString. Column name for suggestions cursor.
const
SuggestColumnQueryString. Column name for suggestions cursor.
const
SuggestColumnRatingScoreString. Column name for suggestions cursor.
const
SuggestColumnRatingStyleString. Column name for suggestions cursor.
const
SuggestColumnRentalPriceString. Column name for suggestions cursor.
const
SuggestColumnResultCardImageString. Column name for suggestions cursor.
const
SuggestColumnShortcutIdString. Column name for suggestions cursor.
const
SuggestColumnSpinnerWhileRefreshingString. Column name for suggestions cursor.
const
SuggestColumnText1String. Column name for suggestions cursor.
const
SuggestColumnText2String. Column name for suggestions cursor.
const
SuggestColumnText2UrlString. Column name for suggestions cursor.
const
SuggestColumnVideoHeightString. Column name for suggestions cursor.
const
SuggestColumnVideoWidthString. Column name for suggestions cursor.
const
SuggestMimeTypeString. MIME type for suggestions data.
const
SuggestNeverMakeShortcutString. Column value for suggestion column SearchManager.SuggestColumnShortcutId when a suggestion should not be stored as a shortcut in global search.
const
SuggestParameterLimitString. Query parameter added to suggestion queries to limit the number of suggestions returned.
const
SuggestUriPathQueryString. Uri path for queried suggestions data.
const
SuggestUriPathShortcutString. Uri path for shortcut validation.
const
UserQueryString. Intent extra data key: Use this key with Intent.GetStringExtra(String) to obtain the query string typed in by the user.

Public Properties

[read-only]
GlobalSearchActivityComponentName. Gets the name of the global search activity.
[read-only]
SearchablesInGlobalSearchIList<SearchableInfo>. Returns a list of the searchable activities that can be included in global search.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
FromContext(Context) : SearchManager
GetSearchableInfo(ComponentName) : SearchableInfo
Gets information about a searchable activity.
OnCancel(IDialogInterface)
This method will be invoked when the dialog is canceled.
OnDismiss(IDialogInterface)
This method will be invoked when the dialog is dismissed.
SetOnCancelListener(SearchManager+IOnCancelListener)
Set or clear the callback that will be invoked whenever the search UI is canceled.
SetOnDismissListener(SearchManager+IOnDismissListener)
Set or clear the callback that will be invoked whenever the search UI is dismissed.
StartSearch(String, Boolean, ComponentName, Bundle, Boolean)
Launch search UI.
StopSearch()
Terminate search UI.
TriggerSearch(String, ComponentName, Bundle)
Similar to SearchManager.StartSearch(String,Boolean,Boolean,Boolean,Boolean) but actually fires off the search query after invoking the search dialog.

Public Events