Build 1.0_r1(from source)

android.os
Class Environment

java.lang.Object
  extended by android.os.Environment

public class Environment
extends Object

Provides access to environment variables.


Field Summary
static String MEDIA_BAD_REMOVAL
          getExternalStorageState() returns MEDIA_BAD_REMOVAL if the media was removed before it was unmounted.
static String MEDIA_MOUNTED
          getExternalStorageState() returns MEDIA_MOUNTED if the media is present and mounted at its mount point with read/write access.
static 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.
static String MEDIA_REMOVED
          getExternalStorageState() returns MEDIA_REMOVED if the media is not present.
static String MEDIA_SHARED
          getExternalStorageState() returns MEDIA_SHARED if the media is present not mounted, and shared via USB mass storage.
static String MEDIA_UNMOUNTABLE
          getExternalStorageState() returns MEDIA_UNMOUNTABLE if the media is present but cannot be mounted.
static String MEDIA_UNMOUNTED
          getExternalStorageState() returns MEDIA_UNMOUNTED if the media is present but not mounted.
 
Constructor Summary
Environment()
           
 
Method Summary
static File getDataDirectory()
          Gets the Android data directory.
(package private) static File getDirectory(String variableName, String defaultPath)
           
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEDIA_REMOVED

public static final String MEDIA_REMOVED
getExternalStorageState() returns MEDIA_REMOVED if the media is not present.

See Also:
Constant Field Values

MEDIA_UNMOUNTED

public static final String MEDIA_UNMOUNTED
getExternalStorageState() returns MEDIA_UNMOUNTED if the media is present but not mounted.

See Also:
Constant Field Values

MEDIA_MOUNTED

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.

See Also:
Constant Field Values

MEDIA_MOUNTED_READ_ONLY

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.

See Also:
Constant Field Values

MEDIA_SHARED

public static final String MEDIA_SHARED
getExternalStorageState() returns MEDIA_SHARED if the media is present not mounted, and shared via USB mass storage.

See Also:
Constant Field Values

MEDIA_BAD_REMOVAL

public static final String MEDIA_BAD_REMOVAL
getExternalStorageState() returns MEDIA_BAD_REMOVAL if the media was removed before it was unmounted.

See Also:
Constant Field Values

MEDIA_UNMOUNTABLE

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.

See Also:
Constant Field Values
Constructor Detail

Environment

public Environment()
Method Detail

getRootDirectory

public static File getRootDirectory()
Gets the Android root directory.


getDataDirectory

public static File getDataDirectory()
Gets the Android data directory.


getExternalStorageDirectory

public static File getExternalStorageDirectory()
Gets the Android external storage directory.


getDownloadCacheDirectory

public static File getDownloadCacheDirectory()
Gets the Android Download/Cache content directory.


getExternalStorageState

public static String getExternalStorageState()
Gets the current state of the external storage device.


getDirectory

static File getDirectory(String variableName,
                         String defaultPath)

Build 1.0_r1(from source)

Please submit a feedback, bug or feature