2

Possible Duplicate:
Make a File/Folder Hidden on Windows with Java

I want to insert the files into sd card and that files should not visible normally, It should be visible only through my application.

Community
  • 1
  • 1
Prem kumar adepu
  • 181
  • 2
  • 13
  • 1
    are you asking for possibility it work? are you asking for technical possibility? are you asking for other to code what you want? what actually have you tried? – Jasonw Nov 01 '12 at 15:12
  • If you place all your files in a subdirectory (that you create from your application), you could use the http://developer.android.com/reference/java/io/FilePermission.html API to remove "read" permission for anyone except the directory owner (i.e. your app). That should prevent other apps from listing the contents in that directory. – Michael Nov 01 '12 at 15:15
  • This question has nothing to do with hiding a file/folder on Windows. This is an Android Development question and trying to hide a file on android is a valid and unrelated question. The SD card can be browsed by the Android device itself, which last I checked, doesn't run Windows. – JustinMorris Nov 02 '12 at 22:59

1 Answers1

2

There is no way to hide files on your SD card from a file browser.. but if you have files that you don't want android to index and show in media players like avi or mp3 files, you just need to create a file called .nomedia in the same directory as your media files.

JustinMorris
  • 7,259
  • 3
  • 30
  • 36