Save XML file on Android device and read it
问题 I have issues with storing and reading an XML file on my Acer Iconia Tab A 100. The steps I followed are: 1) Plug in the tab to my system. 2) Copy test.xml file from my laptop to Acer Iconia Tab/ SDCard/ mydir/test.xml 3) Try to open this file in Android code, as follows: File testFile = null; File dir = new File(android.os.Environment.getExternalStorageDirectory(),"mydir"); if(dir.exists()) testFile = new File(dir, "test.xml"); if (testFile != null) Log.d ("File length="+testFile.length());