Hi all, How do i create a file in phone memory instead of SD card.
+1
A:
You should only have access to the directories possessing the correct access rights for your application.
Usually, you will use the method Context.getDir("example", MODE_PRIVATE)
to get a writeable directory on the phone memory.
It creates a directory called /data/data/[package_name]/app_example
.
You will then be able to create files in that directory.
You can also use :
FileOutputStream f = context.openFileOutput("filetest", MODE_PRIVATE);
which will create and open a file named /data/data/[package name]/files/filetest
.
SirDarius
2010-07-20 09:06:35
Thanks for ur help!
Janardhanan.S
2010-07-21 13:00:20