I'm trying to download a file from a web server and then save it to a folder inside within my apps folder in data/data
. However, I get this error:
java.io.FileNotFoundException: /data/data/com.package.name/databases/file: open failed: ENOENT (No such file or directory)
This is my code inside AsyncTask (copied from Download a file with Android, and showing the progress in a ProgressDialog):
FileOutputStream output = new FileOutputStream("/data/data/" + getPackageName() + "/databases/file");
Where is the problem?