I am working on an app that writes the response of a server in an xml file, created and saved on the device.
In development, DDMS I can see and Use the file in /data/data/my.package/files/test.xml
Because I am trying to test something on a real device and don’t want to make a request to the server I wanted to copy-paste by hand the test.xml in the device(tablet), like this:
root/created data folder/created data folder/created my.package folder/created files folder/put my test.xml here. Tried different options to put the test.xml in the same place with the .apk etc. I still get file not found on the device.
In code I simply get the file like this:
context.openFileInput("test.xml"); // on the emulator works.
Should it look in data/data/my.package/test.xml?
If so, why on tablet if i create the same path in Android device shouldn’t I find the file ?
I hope I wasn’t confusing, any ideas would be great. Thank you.
You should have put it in /data/data/your.package/files/test.xml (note the
filespart)