public final class AVStorage extends Object
You can obtain AVStorage.Audio, AVStorage.Video, and AVStorage.Images instances
that contain index information for different types of media data.
SystemCapability.Multimedia#MEDIA_LIBRARY| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
AVStorage.Audio |
Provides all media data of the
audio/* MIME type. |
static interface |
AVStorage.AVBaseColumns |
Provides basic fields for media data.
|
static class |
AVStorage.Downloads |
Provides download item information.
|
static class |
AVStorage.Files |
Provides the index table for all media files.
|
static class |
AVStorage.Images |
Provides all media data of the
image/* MIME type. |
static class |
AVStorage.Video |
Provides all media data of the
video/* MIME type. |
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Uri |
MEDIA_AUTH_HEAD_URI |
Indicates the media data authentication header, which is in dataability://URI} format.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static Uri |
appendPendingResource(Uri uri) |
Updates the specified
Uri to include media items to be processed. |
static Uri |
appendRequireOriginalResource(Uri uri) |
Updates the specified
Uri to provide the application with
access to original file content. |
static Uri |
fetchDocumentResource(Context context,
Uri mediaUri) |
Obtains a document URI that is equivalent to the specified
AVStorage URI. |
static Set<String> |
fetchExternalVolumeNames(Context context) |
Obtains names of the volumes that form the external volume.
|
static Uri |
fetchLoggerResource() |
Obtains a URI in dataability:// format used to query the media scanning state.
|
static Uri |
fetchMediaResource(Context context,
Uri documentUri) |
Obtains an
AVStorage URI that is equivalent to the specified document URI. |
static String |
fetchVersion(Context context) |
Obtains the opaque version information of the volume named
external_primary. |
static String |
fetchVersion(Context context,
String volumeName) |
Obtains the opaque version information of the specified volume.
|
static String |
fetchVolumeName(Uri uri) |
Obtains the name of the database volume based on the specified
Uri. |
public static final Uri MEDIA_AUTH_HEAD_URI
public static Uri appendPendingResource(Uri uri)
Uri to include media items to be processed.uri - Indicates the URI to update.IllegalArgumentException - Throws this exception if the input URI is null.public static Uri appendRequireOriginalResource(Uri uri)
Uri to provide the application with
access to original file content.uri - Indicates the URI to update.IllegalArgumentException - Throws this exception if the input URI is null.public static String fetchVolumeName(Uri uri)
Uri.uri - Indicates the URI.IllegalArgumentException - Throws this exception if the input URI is null.public static Set<String> fetchExternalVolumeNames(Context context)
context - Indicates the application context.IllegalArgumentException - Throws this exception if the application context is null or invalid.public static Uri fetchMediaResource(Context context, Uri documentUri)
AVStorage URI that is equivalent to the specified document URI.context - Indicates the application context.documentUri - Indicates the document URI.AVStorage URI.IllegalArgumentException - Throws this exception if the application context is null or invalid,
or the document URI is null.public static Uri fetchDocumentResource(Context context, Uri mediaUri)
AVStorage URI.context - Indicates the application context.mediaUri - Indicates the AVStorage URI.IllegalArgumentException - Throws this exception if the application context is null or invalid,
or the AVStorage URI is null.public static String fetchVersion(Context context)
external_primary.context - Indicates the application context.IllegalArgumentException - Throws this exception if the application context is null or invalid.public static String fetchVersion(Context context, String volumeName)
context - Indicates the application context.volumeName - Indicates the volume name.IllegalArgumentException - Throws this exception if the application context is null or invalid,
or the volume name is null or invalid.public static Uri fetchLoggerResource()