marius
marius

Reputation: 172

Android: Where are files saved?

I'm programming an app, which needs to store data in a textfile.

I'm using FileOutputStream:

outputStream = openFileOutput(filename, Context.MODE_PRIVATE);
outputStream.write(data.getBytes());
outputStream.close();

My question is: Where is the file saved?

I can't find it anywhere...

For debugging, I'm using a nexus7.

Upvotes: 2

Views: 790

Answers (4)

kevz
kevz

Reputation: 2737

writes to a file in your internal directory /data/data/pacakage/files

Upvotes: 0

nikis
nikis

Reputation: 11254

It's stored under /data/data/<your app> by default. But unless you have rooted device, you have no access to this folder from device. But you can take a look on your file by using DDMS from the Android SDK (at the android-sdk\tools folder)

Upvotes: 2

vinay Maneti
vinay Maneti

Reputation: 1451

/data/data/your.app.package.name/files, but note this can be device dependent.. you can find it in eclipse by typing DDMS and then go to file explorer and then follow the above path

Upvotes: 0

pepe-pa
pepe-pa

Reputation: 552

If You are using Context.MODE_PRIVATE it is stored in application data directory and you do not have access to them from file manager

Upvotes: 0

Related Questions