I want to create some hidden folders like photo hide app and hide the selected image from gallery or camera to selected hidden folder.i googled a lot but i couldn't find any solution.please find me a solution.. Thanks in advance
my requirement is when i add files to hidden folder those should not be shown in gallery but hidden folders and files should be shown only in my application..
To create hidden folders or files follow Hamid S. instructions:
File file = new File(Environment.getExternalStorageDirectory().getPath() + "/.Image/");
file.mkdirs();
To prevent the eg. gallery app from showing pictures within /.Image/, create the additional (empty) file .nomedia
This prevents media scanner from reading your media files and providing them to other apps through the MediaStore content provider. However, if your files are truly private to your app, you should save them in an app-private directory.
To create hidden folder or file use Dot (.)
that folder or file name.
Suppose, you want create a folder named Image
which will be hidden then create as follows...
File file = new File(Environment.getExternalStorageDirectory().getPath() + "/.Image/");
file.mkdirs();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With