After an intensive search, I could not find out how to read the configuration file (xml) from internal memory (loading a subfolder). I tried to access /mnt/sdcard/Download/config.xml but got an exception.
When I try to get accessible folders from two possible providers ApplicationContext and Environment , I get the following data:
context.getFilesDir().getAbsolutePath(); // /data/data/com.xxx.yyy/files context.getDir("Download", 0).getAbsolutePath(); // /data/data/com.xxx.yyy/app_Download context.getDir("Download", 1).getAbsolutePath(); // /data/data/com.xxx.yyy/app_Download Environment.getExternalStorageDirectory().getAbsolutePath(); // /storage/emulated/0 context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath(); // /storage/emulated/0/Android/data/com.xxx.yyy/files/Download Environment.getDataDirectory().getPath(); // /data
When I try to get this information to access config.xml in the Download- folder (I manually copied the file through Windows Explorer), I get errors, for example. FileNotFoundException or IllegalArgumentException exception.
Where is my file and how can I access it properly?
source share