i do not understand why only by emulator, i can't read files that i have into my SD card directory (send it by DDMS). This is how i create a directory:
public static boolean makeDirectory(Context context){
boolean make= true;
String sp = Utility.getDirectory();
File dirp = new File(Environment.getExternalStorageDirectory(), sp);
if (!dirp.exists()) {
if (!dirp.mkdirs()) {
return false;
}
}
return make;
}
public static String getDirectory(){
return Environment.getExternalStorageDirectory()+"/EchoDrive/";
}
this is how i read my directory:
File directory = new File(Utility.getDirectory());
File[] files = directory.listFiles();
why from Android emulator array files is always null? thanks!