English | Site Directory

Android - An Open Handset Alliance Project

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_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  getDrmContentDirectory()
Gets the Android DRM 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_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 getDrmContentDirectory()

Gets the Android DRM 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.
Build m5-rc15g - 14 May 2008 12:50