I´m developing in Ecilpse ADT (for external issues), and I have a device with Android. It's an EPD (electronic paper) with Android 4.0.4 (Ice Cream Sandwich), and the device has one microSD card, but I can't access it programmatically. I need to read some images inside it.
As a test I have tried with the following code and other variations, and I have not been successful:
File sdcard = Environment.getExternalStorageDirectory();
File file = new File(sdcard,"prueba_sd.txt");
StringBuilder text = new StringBuilder();
try {
BufferedReader br = new BufferedReader(new FileReader(file));
String line;
while ((line = br.readLine()) != null) {
text.append(line);
text.append('\n');
}
br.close();
Log.i("Ficheros", "It works!");
}
catch (Exception ex) {
Log.e("Ficheros", "Doesnt work");
}
Additional this is the structure of the DDMS perspective: