http://www.chinaup.org/docs/reference/android/os/Environment.html
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_REMOVED 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Object clone()
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the
receiver.
boolean equals(Object o)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
void finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver.
final Class<? extends Object> getClass()
Returns the unique instance of java.lang.Class which represents the class of the receiver.
int hashCode()
Returns an integer hash code for the receiver.
final void notify()
Causes one thread which is wait ing on the receiver to be made ready to run.
final void notifyAll()
Causes all threads which are wait ing on the receiver to be made ready to run.
String toString()
Returns a string containing a concise, human-readable description of the receiver.
final void wait(long time, int frac)
Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated
by notify or notifyAll) or the expiration of the timeout.
final void wait(long time)
Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated
by notify or notifyAll) or the expiration of the timeout.
final void wait()
Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by
notify or notifyAll).
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_REMOVED 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.