SD Card is a Secure Digital Card available with Android which acts as the External Storage Directory.
Android supports also access to an external storage system e.g. the SD card. All files and directories on the external storage system are readable for all applications.
You can get the path to the external storage system via the Environment.getExternalStorageDirectory()
method. To write to the external storage system your application needs the android.permission.WRITE_EXTERNAL_STORAGE
permission.
Note: Beginning with Android 4.4, that permission is not required if you're reading or writing only files that are private to your app. For more information, see the section below about saving files that are app-private.
Before you do any work with the external storage, you should always call getExternalStorageState() to check whether the media is available. The media might be mounted to a computer, missing, read-only, or in some other state.
To check for the write permisson you should check the result of the
Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)
And for the read permisson
Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) ||
Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED_READ_ONLY)