I have an app with xyz.zip folder which is extracting after installation in sdcard. Folder contains a lot of files(e.g Video,audio,etc.).During installing app I wanna hide that folder and hide all items of folder. Thanks in advance.
Any answer is appreciated.
Use a function like this:
public static void hideFile(File file){
File dstFile = new File(file.getParent(), "." + file.getName());
file.renameTo(dstFile);
}
Please note I did not try the code, but it should at least give you the idea of how to do it.
CommonGuy
If you want to hide folder in Android or any Linux based system just add . as prefix to folder or file name.
Answer stolen from here: How to hide a folder in sdcard in android
来源:https://stackoverflow.com/questions/21179975/how-to-hide-folder-in-sdcard-programmatically-in-android