开发者

Create Folder that can not accessible by any other application

开发者 https://www.devze.com 2023-02-24 17:07 出处:网络
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 soluti开发者_运维知识库on how to achieve this functionality.Use int

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 soluti开发者_运维知识库on how to achieve this functionality.


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();


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消