Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bichooser folder bloats with saved images #183

Open
jessexx opened this issue Jul 28, 2016 · 8 comments
Open

Bichooser folder bloats with saved images #183

jessexx opened this issue Jul 28, 2016 · 8 comments
Assignees

Comments

@jessexx
Copy link

jessexx commented Jul 28, 2016

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.

@coomar2841
Copy link
Owner

This is intended. clearOldFiles should work when you reach a specific threshold foder size.

@jessexx
Copy link
Author

jessexx commented Jul 28, 2016

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.

@coomar2841
Copy link
Owner

It's not there. I can add this as a new feature.

@nilsorathiya
Copy link

nilsorathiya commented Mar 20, 2017

@coomar2841 just use ".bichooser" instead of "bichooser" now for hiding from gallery or albums in device, when you creating folder inside library.

@hardikJoshi123
Copy link

Hey! anybody solved this issue? I have same issue in my case.

@Transformat
Copy link

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.

@nilsorathiya
Copy link

nilsorathiya commented Aug 13, 2017

But I have one easy solution that if we replace bichooser to .bichooser, that will also prevent all choosen photos in Gallery

@Transformat
Copy link

Yes this will indeed do the job but it will still fill up space in the phone. Which is not a good practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants