-1

Possible Duplicate:
How to hide a folder in sdcard in android

I have a problem that I want to hide a folder which contain some videos, resided in sdcard of device for security reasons, and I have to do the same programmatically. I don't know how it will be achieved? Please suggest the right result.

Thanks in advance.

Community
  • 1
  • 1
Sanat Pandey
  • 4,081
  • 17
  • 75
  • 132

1 Answers1

3

Make a folder or file with . as prefix to folder or file name.

EDIT: As android is basic linux the same thing happen in hide directory and files, just create a directory or file with'.' prefix name.

So its worked in all android api version. And second things there are some browser tool available for android which also display this type of hidden directories and files. So its not a secure way,

For storing data in internal storage in your application's package its fine, but from this if device is rooted then anyone can access it.

So, the only way is use encryption/decryption for your files and directories.

user370305
  • 108,599
  • 23
  • 164
  • 151
  • Hey I already checked that with .nomedia folder, it is not working for Android Api level:8 – Sanat Pandey Nov 16 '11 at 09:22
  • Thanks for tour valuable response, you are correct that its easily done by encryption and decryption but once a file is decrypted then what happen, means I want to say that once file is decrypted it is available for all to read and write or delete but this is not desired I want each time file is clicked it then decrypted and being used by the particular user and when again clicked on same file then it again decrypted not used. Means each time when I want to access the file the we have to decrypt it. Can it is possible? If yes then please suggest me how? – Sanat Pandey Nov 16 '11 at 10:02
  • Do encryption and decryption of file in your android application, so your application itself get the right data. not others.. – user370305 Nov 16 '11 at 10:05