Język

MediaStore.GetRecentExternalVolumeNames(Context) Method

Definition

Return list of all recent volume names that have been part of #VOLUME_EXTERNAL.

[Android.Runtime.Register("getRecentExternalVolumeNames", "(Landroid/content/Context;)Ljava/util/Set;", "", ApiSince=30)]
public static System.Collections.Generic.ICollection<string> GetRecentExternalVolumeNames(Android.Content.Context context);
[<Android.Runtime.Register("getRecentExternalVolumeNames", "(Landroid/content/Context;)Ljava/util/Set;", "", ApiSince=30)>]
static member GetRecentExternalVolumeNames : Android.Content.Context -> System.Collections.Generic.ICollection<string>

Parameters

context
Context

The context used to obtain the storage manager for volume enumeration.

Returns

The distinct media-volume names reported by the storage manager's recent-volume list.

Attributes

Remarks

Return list of all recent volume names that have been part of #VOLUME_EXTERNAL.

These volume names are not currently mounted, but they're likely to reappear in the future, so apps are encouraged to preserve any indexed metadata related to these volumes to optimize user experiences.

Each specific volume name can be passed to APIs like MediaStore.Images.Media#getContentUri(String) to interact with media on that storage device.

Java documentation for android.provider.MediaStore.getRecentExternalVolumeNames(android.content.Context).

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