[안드로이드 api] android.os.Environment (SD Card 접근시 사용) :: 소림사의 홍반장!
public class

Environment

extends Object
java.lang.Object
   ↳ android.os.Environment

Class Overview


환경변수에 접근할 수 있게 해준다.

ExternalStorage 등에 접근할 때 사용. AndroidMenifest.xml 에 권한 설정도 필요

Summary


Constants
String MEDIA_BAD_REMOVAL getExternalStorageState() returns MEDIA_BAD_REMOVAL if the media was removed before it was unmounted.
String MEDIA_CHECKING getExternalStorageState() returns MEDIA_CHECKING if the media is present and being disk-checked
String MEDIA_MOUNTED getExternalStorageState() returns MEDIA_MOUNTED if the media is present and mounted at its mount point with read/write access.
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.
String MEDIA_NOFS getExternalStorageState() returns MEDIA_NOFS if the media is present but is blank or is using an unsupported filesystem
String MEDIA_REMOVED getExternalStorageState() returns MEDIA_REMOVED if the media is not present.
String MEDIA_SHARED getExternalStorageState() returns MEDIA_SHARED if the media is present not mounted, and shared via USB mass storage.
String MEDIA_UNMOUNTABLE getExternalStorageState() returns MEDIA_UNMOUNTABLE if the media is present but cannot be mounted.
String MEDIA_UNMOUNTED getExternalStorageState() returns MEDIA_UNMOUNTED if the media is present but not mounted.
Fields
public static String DIRECTORY_ALARMS Standard directory in which to place any audio files that should be in the list of alarms that the user can select (not as regular music).
public static String DIRECTORY_DCIM The traditional location for pictures and videos when mounting the device as a camera.
public static String DIRECTORY_DOWNLOADS Standard directory in which to place files that have been downloaded by the user.
public static String DIRECTORY_MOVIES Standard directory in which to place movies that are available to the user.
public static String DIRECTORY_MUSIC Standard directory in which to place any audio files that should be in the regular list of music for the user.
public static String DIRECTORY_NOTIFICATIONS Standard directory in which to place any audio files that should be in the list of notifications that the user can select (not as regular music).
public static String DIRECTORY_PICTURES Standard directory in which to place pictures that are available to the user.
public static String DIRECTORY_PODCASTS Standard directory in which to place any audio files that should be in the list of podcasts that the user can select (not as regular music).
public static String DIRECTORY_RINGTONES Standard directory in which to place any audio files that should be in the list of ringtones that the user can select (not as regular music).
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 File getExternalStoragePublicDirectory(String type)
Get a top-level public external storage directory for placing files of a particular type.
static String getExternalStorageState()
Gets the current state of the primary "external" storage device.
static File getRootDirectory()
Gets the Android root directory.
static boolean isExternalStorageEmulated()
Returns whether the device has an external storage device which is emulated.
static boolean isExternalStorageRemovable()
Returns whether the primary "external" storage device is removable.
[Expand]
Inherited Methods
 From class java.lang.Object

다른 카테고리의 글 목록

Dev. 안드로이드/API 및 이론 카테고리의 포스트를 톺아봅니다