I want to hide folder in my application and I used ".folder_name" , but after "show hidden file checkbox" enable then show hidden folder . Please give me another solution apart from this due to which I can not show that folder .
Asked
Active
Viewed 2,375 times
-6
-
Possible duplicate of [How to hide folder in sdcard programmatically in android](https://stackoverflow.com/questions/21179975/how-to-hide-folder-in-sdcard-programmatically-in-android) – AskNilesh Aug 01 '17 at 12:16
-
how does hidden folder differ from regular? Why do you think that other apps won't be able to see that folder, if your app will be able? – Vladyslav Matviienko Aug 01 '17 at 12:17
-
I know this solution but sir I don't want to use .. File folder = new File(Environment.getExternalStorageDirectory(), ".hiddenFolder"); folder.mkdir(); – Akash Garg Aug 01 '17 at 12:17
1 Answers
2
Android is based on Linux and it is not possible to hide files or folders apart from adding a . before the file or folder name. This will just hide thing for 'ls' but not for 'ls -a'. Hence, in Android too, everyone can see all the files not matter how you hide it.
You can encrypt the file so that even after accessing, user can not make sense out of it.
Or you can transfer the file internal storage where another app and user itself cannot see only that app can access the file and delete the file from where it was.

Sayam
- 35
- 6

blackspacer
- 343
- 6
- 15