How to hide a folder in sdcard in android

If you want to hide folder in Android or any Linux based system just add . as prefix to folder or file name.

However if you mount your SD card on Windows machine then these folders will be visible, with the . in front of the folder name, as a normal folder.


So, as ingsaurabh said correctly, a "." is all you need. If a file name starts with it, most file browsers will not display the file. But it is not directly invisible (e.g. the Samsung stock file manager has an option to display such files and folders). So you cannot ever be sure that the user will not see the files, especially if the user uses different apps to access files on sdcard.

The only way to hide your files is the internal storage since these files are private to your application. However it's not a good idea to store large amount of data in internal storage (it will give your app bad rating, that's for sure).

It's a good thing to stick to the guideline in the Data Storage Dev Guide, thus saving your data to the folder /Android/data/<package_name>/files/.