CloudMediaProvider.OnQueryMediaCategories 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 MediaCategories under the given parentCategoryId
,
filtered by extras
.
[Android.Runtime.Register("onQueryMediaCategories", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "GetOnQueryMediaCategories_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_CancellationSignal_Handler", ApiSince=36)]
public virtual Android.Database.ICursor OnQueryMediaCategories(string? parentCategoryId, Android.OS.Bundle extras, Android.OS.CancellationSignal? cancellationSignal);
[<Android.Runtime.Register("onQueryMediaCategories", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "GetOnQueryMediaCategories_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_CancellationSignal_Handler", ApiSince=36)>]
abstract member OnQueryMediaCategories : string * Android.OS.Bundle * Android.OS.CancellationSignal -> Android.Database.ICursor
override this.OnQueryMediaCategories : string * Android.OS.Bundle * Android.OS.CancellationSignal -> Android.Database.ICursor
Parameters
- parentCategoryId
- String
the ID of the parent category to filter media categories.
- extras
- Bundle
containing keys to filter media categories:
<ul>
<li> android.content.Intent#EXTRA_MIME_TYPES
</ul>
- cancellationSignal
- CancellationSignal
CancellationSignal
to check if request has been cancelled.
Returns
cursor with CloudMediaProviderContract.MediaCategoryColumns
columns
- Attributes
Remarks
Queries for the available MediaCategories under the given parentCategoryId
, filtered by extras
. The columns of MediaCategories are in the class CloudMediaProviderContract.MediaCategoryColumns
.
When parentCategoryId
is null, this returns the root categories.
The order in which media categories 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 filter the results. If the provider handled any filters 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 params in extras
.
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.