I have a problem reading an XML file in my APP. I tried several options, but I get an error that reads acces - false. I am sure I am using the correct path.
XML = new file (XML, "file.xml");
Log.i ("XML", "Read access:" + XML.canRead ());
This returns a lie, I only need to read so as not to write (at least not yet ..).
System.getProperty (XML.getPath ())
Returns null
I think the problem is with the SD card (see other question ). But in my application, I can open different folders except the XML file in the last folder.
I added the correct permission to the manifest file.
Any help is greatly appreciated. Thanks.
Edit: File path:
File f = new File(Environment.getExternalStorageDirectory().toString() + File.separator + "external_sd" + File.separator + "app" + File.separator + "Games" + File.separator + "Version_1" );
I have no problem opening folders. In my last folder there will be xml that cannot be opened.
I use part of the path in other parts of APP and it works there.
Also the XML.exists() code returns false ...
Rik
source share