Partager via


CloudMediaProvider.OnQueryMedia(Bundle) Method

Definition

Returns a cursor representing all media items in the media collection optionally filtered by extras and sorted in reverse chronological order of CloudMediaProviderContract.MediaColumns#DATE_TAKEN_MILLIS, i.

[Android.Runtime.Register("onQueryMedia", "(Landroid/os/Bundle;)Landroid/database/Cursor;", "GetOnQueryMedia_Landroid_os_Bundle_Handler", ApiSince=33)]
public abstract Android.Database.ICursor OnQueryMedia (Android.OS.Bundle extras);
[<Android.Runtime.Register("onQueryMedia", "(Landroid/os/Bundle;)Landroid/database/Cursor;", "GetOnQueryMedia_Landroid_os_Bundle_Handler", ApiSince=33)>]
abstract member OnQueryMedia : Android.OS.Bundle -> Android.Database.ICursor

Parameters

extras
Bundle

containing keys to filter media items: <ul> <li> CloudMediaProviderContract#EXTRA_SYNC_GENERATION<li> CloudMediaProviderContract#EXTRA_PAGE_TOKEN<li> CloudMediaProviderContract#EXTRA_ALBUM_ID<li> CloudMediaProviderContract#EXTRA_PAGE_SIZE</ul>

Returns

cursor representing media items containing all CloudMediaProviderContract.MediaColumns columns

Attributes

Remarks

Returns a cursor representing all media items in the media collection optionally filtered by extras and sorted in reverse chronological order of CloudMediaProviderContract.MediaColumns#DATE_TAKEN_MILLIS, i.e. most recent items first.

The cloud media provider must set the CloudMediaProviderContract#EXTRA_MEDIA_COLLECTION_ID as part of the returned Cursor#setExtrasBundle. Not setting this is an error and invalidates the returned Cursor.

If the cloud media provider handled any filters in extras, it must add the key to the ContentResolver#EXTRA_HONORED_ARGS as part of the returned Cursor#setExtrasBundle.

Java documentation for android.provider.CloudMediaProvider.onQueryMedia(android.os.Bundle).

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.

Applies to