CloudMediaProvider.OnQuerySearchSuggestions Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Queries for the available SearchSuggestions based on a prefixText,
filtered by extras.
[Android.Runtime.Register("onQuerySearchSuggestions", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "GetOnQuerySearchSuggestions_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_CancellationSignal_Handler", ApiSince=36)]
public virtual Android.Database.ICursor OnQuerySearchSuggestions(string prefixText, Android.OS.Bundle extras, Android.OS.CancellationSignal? cancellationSignal);
[<Android.Runtime.Register("onQuerySearchSuggestions", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "GetOnQuerySearchSuggestions_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_CancellationSignal_Handler", ApiSince=36)>]
abstract member OnQuerySearchSuggestions : string * Android.OS.Bundle * Android.OS.CancellationSignal -> Android.Database.ICursor
override this.OnQuerySearchSuggestions : string * Android.OS.Bundle * Android.OS.CancellationSignal -> Android.Database.ICursor
Parameters
- prefixText
- String
the prefix text to filter search suggestions.
- extras
- Bundle
containing keys to filter search suggestions.
<ul>
<li> CloudMediaProviderContract#EXTRA_PAGE_SIZE</ul>
- cancellationSignal
- CancellationSignal
CancellationSignal to check if request has been cancelled.
Returns
cursor representing search suggestions containing all
CloudMediaProviderContract.SearchSuggestionColumns columns
- Attributes
Remarks
Queries for the available SearchSuggestions based on a prefixText, filtered by extras. The columns of SearchSuggestions are in the class CloudMediaProviderContract.SearchSuggestionColumns
If the user has not started typing, this is considered as zero state suggestion. In this case prefixText will be empty string.
The order in which suggestions are sorted in the cursor will be retained when displaying results to the user.
The cloud media provider must set the CloudMediaProviderContract#EXTRA_MEDIA_COLLECTION_ID as part of the returned cursor by using Cursor#setExtras . Not setting this is an error and invalidates the returned Cursor, meaning photo picker will not use the cursor for any operation.
extras may contain some key-value pairs which should be used to prepare the results. If the provider handled any params in extras, it must add the key to the ContentResolver#EXTRA_HONORED_ARGS as part of the returned cursor by using Cursor#setExtras. If not honored, photo picker will assume the result of the query is without the extra being used. Note: Currently this function does not pass any key-value params in extras.
Results may not be displayed if it takes longer than 300 milliseconds to get a response from the cloud media provider.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.