1

i want to create a one folder that can not accessible by any other application.

Is it possible to do this ? If yes then give me the solution how to achieve this functionality.

Sush
  • 6,599
  • 1
  • 16
  • 26
Chirag
  • 56,384
  • 29
  • 154
  • 197

3 Answers3

2

Use internal storage like so:

String FILENAME = "hello_file";
String string = "hello world!";

FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
fos.write(string.getBytes());
fos.close();
Mark Mooibroek
  • 7,548
  • 3
  • 31
  • 53
1

Check out Using the Internal Storage to use the storage that is private to your app.

Rajath
  • 11,544
  • 7
  • 44
  • 60
1

On the SD card (without a rooted phone) you can't create a folder which is only accessible by your application.

But everything you write to your "internal storage" is only accessible by your application. see http://developer.android.com/guide/topics/data/data-storage.html#filesInternal

Tobias
  • 6,969
  • 6
  • 61
  • 84