Hi all har have a problem with listing files on the sd card. i created a method for traverse the sdcard and add files to a list. On the emulator it works like a charm, but on the real device it only adds a few files to the list. i have tried with some permission settings without any luck. i have check files that is not on the list, and they have both read write bit set.
it is first called with the file returned from, Environment.getExternalStorageDirectory(); private void digDir(File f) { File[] files = f.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) digDir(files[i]); else { // && files[i].getName().endsWith(".xml") if (files[i].isFile() ) { HashMap<String, String> hm = new HashMap<String, String>(); hm.put("TEXT", files[i].getName()); hm.put("PATH", files[i].getAbsolutePath()); filelist.add(hm); } } } } thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en