George Irimiciuc
George Irimiciuc

Reputation: 4633

Internal storage files location

String filename = "myfile";
String string = "Hello world!";
FileOutputStream outputStream;

try {
  outputStream = openFileOutput(filename, Context.MODE_PRIVATE);
  outputStream.write(string.getBytes());
  outputStream.close();
} catch (Exception e) {
  e.printStackTrace();
}

Ok so the above code creates a file in the internal storage and writes something into it. My question is, where can I find and open this file in Eclipse? I want to see its contents and edit it manually. Or I may want to include my own file and read its contents.

Upvotes: 0

Views: 79

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007624

My question is, where can I find and open this file in Eclipse?

Using the file manager in the DDMS perspective, for the default user account on an emulator, go to /data/data/your.application.id.goes.here/files, substituting in the package from your manifest where I have your.application.id.goes.here.

Upvotes: 2

Related Questions