Język

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

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

Returns

The names of eligible mounted media volumes, including read-only volumes; entries without a media-store volume name are omitted.

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