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,839
  • 1
  • 18
  • 26
Chirag
  • 56,621
  • 29
  • 151
  • 198

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,636
  • 3
  • 32
  • 53
1

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

Rajath
  • 11,787
  • 7
  • 48
  • 62
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
  • 7,282
  • 6
  • 63
  • 85