i’m using the standard method for reading files stored on the sdcard:
public static Bitmap loadImage( String imageName ){
File root = Environment.getExternalStorageDirectory();
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inPreferredConfig = Bitmap.Config.RGB_565;
Bitmap image = BitmapFactory.decodeFile(root+"/magazine/lowres/"+imageName+".jpg", opt);
return image;
}
The image is on that directory, but i’m getting this excepction:
java.io.FileNotFoundException: /mnt/sdcard/magazine/lowres/1.jpg (No such file or directory)
What i’m doing wrong?
SOLVED:
Samsung Galaxy Tab has a good amount of internal flash memory. So Environment.getExternalStorageDirectory() returns /mnt/sdcard/ but this is actually the internal storage. The real external storage is in /mnt/sdcard/external_sd/.