Partager via


MediaStore.GetExternalVolumeNames(Context) Method

Definition

Return list of all specific volume names that make up #VOLUME_EXTERNAL.

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

Parameters

context
Context

Returns

Attributes

Remarks

Return list of all specific volume names that make up #VOLUME_EXTERNAL. This includes a unique volume name for each shared storage device that is currently attached, which typically includes MediaStore#VOLUME_EXTERNAL_PRIMARY.

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.getExternalVolumeNames(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