1

My application can read xml files, located on the sdcard. I read android artical:External Storage This artical said in android 4.4 you can read just from your application folder so how can I get xml files when the user put it on sdcard and how I can I read it from that place. Please give me an example or tutorial.

Here is the code, I currently have:

   File myInternalFile;
   String filepath = "plane";
   private String filename = "Pro.xml";
   String path = context.getExternalFilesDir(null).getAbsolutePath();
   myInternalFile = new File(path, filename);
Laurent Meyer
  • 2,766
  • 3
  • 33
  • 57

1 Answers1

0

It changed a bit on KitKat but it remains possible to do it: the only difference is that you cannot store the data everywhere the sd card as they very well explained there. So if you want to store on sd card or read from sd card: look at this topic on Android Developers. And here is a more practical example:

Community
  • 1
  • 1
Laurent Meyer
  • 2,766
  • 3
  • 33
  • 57