MediaStore.QueryDeletedFiles 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.
Returns a cursor of deleted items matching the given query arguments.
[Android.Runtime.Register("queryDeletedFiles", "(Landroid/content/ContentResolver;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "", ApiSince=37)]
public static Android.Database.ICursor? QueryDeletedFiles(Android.Content.ContentResolver resolver, Android.OS.Bundle? queryArgs, Android.OS.CancellationSignal? signal);
[<Android.Runtime.Register("queryDeletedFiles", "(Landroid/content/ContentResolver;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "", ApiSince=37)>]
static member QueryDeletedFiles : Android.Content.ContentResolver * Android.OS.Bundle * Android.OS.CancellationSignal -> Android.Database.ICursor
Parameters
- resolver
- ContentResolver
The ContentResolver to use for the call.
- queryArgs
- Bundle
Arguments for the query. Supported arguments include
ContentResolver#QUERY_ARG_SQL_SELECTION,
ContentResolver#QUERY_ARG_SQL_SELECTION_ARGS,
ContentResolver#QUERY_ARG_SQL_SORT_ORDER,
ContentResolver#QUERY_ARG_LIMIT, and
ContentResolver#QUERY_ARG_OFFSET. The selection and sort order can
filter and sort on any of the columns defined in
DeletedFiles.DeletedFilesColumns.
- signal
- CancellationSignal
A cancellation signal to cancel the operation in progress.
Returns
A cursor of deleted items, or null if the operation failed.
- Attributes
Remarks
Returns a cursor of deleted items matching the given query arguments.
Note: This method only returns deleted items for external volumes. Items deleted from the internal volume are not tracked or returned by this API.
Note: If an external volume (such as an SD card) is removed from the device, its associated deleted items are no longer tracked or returned by this API.
The returned cursor includes columns such as DeletedFiles.DeletedFilesColumns._ID, DeletedFiles.DeletedFilesColumns.MEDIA_TYPE, DeletedFiles.DeletedFilesColumns.DELETED_GENERATION, and DeletedFiles.DeletedFilesColumns.VOLUME_NAME.
Android reference for android.provider.MediaStore.queryDeletedFiles.
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.