Android
android.os
public class

android.os.Environment

java.lang.Object
android.os.Environment

Provides access to environment variables.

Summary

Constants

      Value  
String  MEDIA_BAD_REMOVAL  getExternalStorageState() returns MEDIA_BAD_REMOVAL if the media was removed before it was unmounted.  "bad_removal" 
String  MEDIA_MOUNTED  getExternalStorageState() returns MEDIA_MOUNTED if the media is present and mounted at its mount point with read/write access.  "mounted" 
String  MEDIA_MOUNTED_READ_ONLY  getExternalStorageState() returns MEDIA_MOUNTED_READ_ONLY if the media is present and mounted at its mount point with read only access.  "mounted_ro" 
String  MEDIA_REMOVED  getExternalStorageState() returns MEDIA_MOUNTED if the media is not present.  "removed" 
String  MEDIA_SHARED  getExternalStorageState() returns MEDIA_SHARED if the media is present not mounted, and shared via USB mass storage.  "shared" 
String  MEDIA_UNMOUNTABLE  getExternalStorageState() returns MEDIA_UNMOUNTABLE if the media is present but cannot be mounted.  "unmountable" 
String  MEDIA_UNMOUNTED  getExternalStorageState() returns MEDIA_UNMOUNTED if the media is present but not mounted.  "unmounted" 

Public Constructors

            Environment()

Public Methods

      static    File  getDataDirectory()
Gets the Android data directory.
      static    File  getDownloadCacheDirectory()
Gets the Android Download/Cache content directory.
      static    File  getExternalStorageDirectory()
Gets the Android external storage directory.
      static    String  getExternalStorageState()
Gets the current state of the external storage device.
      static    File  getRootDirectory()
Gets the Android root directory.
Methods inherited from class java.lang.Object

Details

Constants

public static final String MEDIA_BAD_REMOVAL

getExternalStorageState() returns MEDIA_BAD_REMOVAL if the media was removed before it was unmounted.
Constant Value: "bad_removal"

public static final String MEDIA_MOUNTED

getExternalStorageState() returns MEDIA_MOUNTED if the media is present and mounted at its mount point with read/write access.
Constant Value: "mounted"

public static final String MEDIA_MOUNTED_READ_ONLY

getExternalStorageState() returns MEDIA_MOUNTED_READ_ONLY if the media is present and mounted at its mount point with read only access.
Constant Value: "mounted_ro"

public static final String MEDIA_REMOVED

getExternalStorageState() returns MEDIA_MOUNTED if the media is not present.
Constant Value: "removed"

public static final String MEDIA_SHARED

getExternalStorageState() returns MEDIA_SHARED if the media is present not mounted, and shared via USB mass storage.
Constant Value: "shared"

public static final String MEDIA_UNMOUNTABLE

getExternalStorageState() returns MEDIA_UNMOUNTABLE if the media is present but cannot be mounted. Typically this happens if the file system on the media is corrupted.
Constant Value: "unmountable"

public static final String MEDIA_UNMOUNTED

getExternalStorageState() returns MEDIA_UNMOUNTED if the media is present but not mounted.
Constant Value: "unmounted"

Public Constructors

public Environment()

Public Methods

public static File getDataDirectory()

Gets the Android data directory.

public static File getDownloadCacheDirectory()

Gets the Android Download/Cache content directory.

public static File getExternalStorageDirectory()

Gets the Android external storage directory.

public static String getExternalStorageState()

Gets the current state of the external storage device.

public static File getRootDirectory()

Gets the Android root directory.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48