Open jessexx opened 8 years ago
This is intended. clearOldFiles should work when you reach a specific threshold foder size.
Is there a var somewhere I can set so that only TAKE_IMAGE_REQUEST images are saved while CHOOSE_IMAGE_REQUEST images are not? What happens is that on some phones, the gallery app detects the bichooser folder and you end up viewing a ton of duplicate images.
It's not there. I can add this as a new feature.
@coomar2841 just use ".bichooser" instead of "bichooser" now for hiding from gallery or albums in device, when you creating folder inside library.
Hey! anybody solved this issue? I have same issue in my case.
You can use this code to delete all the files
static public boolean deleteDirectory(File path) { if( path.exists() ) { File[] files = path.listFiles(); if (files == null) { return true; } for(int i=0; i<files.length; i++) { if(files[i].isDirectory()) { deleteDirectory(files[i]); } else { files[i].delete(); } } } return( path.delete() ); }
and call this like this :
deleteDirectory(new File(android.os.Environment.getExternalStorageDirectory()+"/bichooser"));
Make sure you have the write permissions. That's it. Hope this helps.
But I have one easy solution that if we replace bichooser to .bichooser, that will also prevent all choosen photos in Gallery
Yes this will indeed do the job but it will still fill up space in the phone. Which is not a good practice.
After taking a picture, a single copy is stored in the /storage/0/emulated/0/bichooser folder. After selecting an image from the gallery, three copies are created with varying image sizes. Is this intended, and if so, is there a way to clear the folder? clearOldFiles() also does not seem to work.
The new android-multipicker-library also has this behavior, it just saves the images into /storage/0/emulated/0/{appname}/{appname}Pictures instead.