Android.Content.ContextWrapper.GetExternalMediaDirs Method
Returns absolute paths to application-specific directories on all external storage devices where the application can place media files.

Syntax

[Android.Runtime.Register("getExternalMediaDirs", "()[Ljava/io/File;", "GetGetExternalMediaDirsHandler")]
public override Java.IO.File[] GetExternalMediaDirs ()

Returns

Documentation for this section has not yet been entered.

Remarks

Returns absolute paths to application-specific directories on all external storage devices where the application can place media files. These files are scanned and made available to other apps through Android.Provider.MediaStore.

This is like Context.GetExternalFilesDirs(string) in that these files will be deleted when the application is uninstalled, however there are some important differences:

  • External files are not always available: they will disappear if the user mounts the external storage on a computer or removes it.
  • There is no security enforced with these files.

External storage devices returned here are considered a permanent part of the device, including both emulated external storage and physical media slots, such as SD cards in a battery compartment. The returned paths do not include transient devices, such as USB flash drives.

An application may store data on any or all of the returned devices. For example, an app may choose to store large files on the device with the most available space, as measured by Android.OS.StatFs.

No permissions are required to read or write to the returned paths; they are always accessible to the calling app. Write access outside of these paths on secondary external storage devices is not available.

Returned paths may be null if a storage device is unavailable.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1