Android.Content.Context.GetExternalCacheDirs Method
Returns absolute paths to application-specific directories on all external storage devices where the application can place cache files it owns.

Syntax

[Android.Runtime.Register("getExternalCacheDirs", "()[Ljava/io/File;", "GetGetExternalCacheDirsHandler")]
public abstract Java.IO.File[] GetExternalCacheDirs ()

See Also

Context.ExternalCacheDir
Android.OS.Environment.GetExternalStorageState(Java.IO.File)

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 cache files it owns. These files are internal to the application, and not typically visible to the user as media.

This is like Context.CacheDir 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.

The first path returned is the same as Context.ExternalCacheDir. 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