How to list all files and folders locating on sd card
It seems that when you touch Back dispatchKeyEvent() receive twice the KeyEvent KEYCODE_BACK, so I suggest you do it this way : public class FileList extends ListActivity { private File file; private List<String> myList; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myList = new ArrayList<String>(); String root_sd = Environment.getExternalStorageDirectory().toString(); file = new File( root_sd + “/external_sd” … Read more