I am trying to use the filepath of an xml file that exists in the assets folder of android, like this:
String filename = "file:///android_asset/test.xml";
FileInputStream fis = new FileInputStream(new File(filename));
System.out.println("FileInputStream : " + fis);
// here it fails
I get an
java.io.FileNotFoundException: /file:/android_asset/text.xml
error and it does not make sense to me.
I made an apk and opened it then with total commander and the xml is in the assets folder. Do you see a problem in my approach? Thank you.