is External Storage Read Only - Android App

Android examples for App:External Storage

Description

is External Storage Read Only

Demo Code


//package com.java2s;
import android.os.Environment;

public class Main {
    public static boolean isExternalStorageReadOnly() {
        String extStorageState = Environment.getExternalStorageState();
        if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(extStorageState)) {
            return true;
        }//from   w ww .j a v  a  2  s . co  m
        return false;
    }
}

Related Tutorials