I'm trying to read the same file "xmlfile.xml" from the assets folder and also another copy from the SD card sdcard/download/.
I can Read from SD Card:
- unfile Return True
- Esite Return True
I can't not Read from Assets folder:
- unfile Return False
- Esite Return False
This code il NOT Working
File source = new File("file:///android_asset/xmlfile.xml");
boolean unfile = source.isFile();
boolean Esiste = source.exists();
try
{
// todo
} catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
This code il Working
File source = new File("/sdcard/" + "download" + "/" + "xmlfile.xml");
boolean unfile = source.isFile();
boolean Esiste = source.exists();
try
{
// todo
} catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
someone can explain me how can I read the file from the Assets folder.
thanks marco