CopyPastor

Detecting plagiarism made easy.

Score: 1.8111247420310974; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2014-02-14
by Nayan Rath

Original Post

Original - Posted on 2011-09-30
by ariefbayu



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Hope This Might Help You !!!
use this code to Checking media availability in **inbuilt external storage.**
boolean mExternalStorageAvailable = false; boolean mExternalStorageWriteable = false; String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { // We can read and write the media mExternalStorageAvailable = mExternalStorageWriteable = true; } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { // We can only read the media mExternalStorageAvailable = true; mExternalStorageWriteable = false; } else { // Something else is wrong. It may be one of many other states, but all we need // to know is we can neither read nor write mExternalStorageAvailable = mExternalStorageWriteable = false; }
do your code depend on that
it's already explained in [android documentation][1].
**Code taken from documentation**
boolean mExternalStorageAvailable = false; boolean mExternalStorageWriteable = false; String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { // We can read and write the media mExternalStorageAvailable = mExternalStorageWriteable = true; } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { // We can only read the media mExternalStorageAvailable = true; mExternalStorageWriteable = false; } else { // Something else is wrong. It may be one of many other states, but all we need // to know is we can neither read nor write mExternalStorageAvailable = mExternalStorageWriteable = false; }
[1]: http://developer.android.com/guide/topics/data/data-storage.html#filesExternal

        
Present in both answers; Present only in the new answer; Present only in the old answer;