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

Is there a way to specify the path of the pics? #205

Open
NokisDemox opened this issue Mar 13, 2020 · 19 comments
Open

Is there a way to specify the path of the pics? #205

NokisDemox opened this issue Mar 13, 2020 · 19 comments

Comments

@NokisDemox
Copy link

I havent found a way with this image picker to choose an specific path for the pics. I would like to be able to choose the path and format of the pics, I have only tested this image picker a bit so I dont know if im missing something or if is just not implemented. Thanks for such a good image picker btw.

@sangcomz
Copy link
Owner

Are you saying that you want to see only images in a specific format (eg gif, png ...) or a certain folder as an image picker?

@talosan
Copy link

talosan commented Mar 27, 2020

Hi. I join the question. In my case, I want to show the images of a specific folder, but with fishbun I can't find the way.

Thank you very much for your work.

@sangcomz
Copy link
Owner

@talosan @NokisDemox
It seems like an interesting feature. By the way, can you tell which situation you need this function?
I don't know where to use. 🤔

@talosan
Copy link

talosan commented Mar 29, 2020

Thanks for answering. I have created an app to generate personalized stickers and send them to WhatsApp. Users need to select at least 3 images from the gallery, but when using fishbun it always appears in the gallery's root directory. I would like it to appear at a specific address, the same one where the custom stickers created by my app are stored.

@sangcomz
Copy link
Owner

Then is it okay to just use the folder name? Or is it necessary for a full path?

@talosan
Copy link

talosan commented Mar 30, 2020

It could be both ways, either way would be valid.

Thanks again for your interest.

@sangcomz
Copy link
Owner

Then let's develop it so that it can be filtered by folder name.

Thanks for suggesting an interesting feature. 😃

@talosan
Copy link

talosan commented Mar 30, 2020

Thank you for your amazing work!

@sangcomz
Copy link
Owner

I did the function development we talked about.

    implementation 'com.sangcomz:FishBun:0.11.4-alpha01'
        FishBun
            .with(this)
            .setImageAdapter(GlideAdapter())
            .isStartInAllView(true)
            .setSpecifyFolderList(arrayListOf("Screenshots", "Camera"))
            .startAlbum()

setSpecifyFolderList(folderNameList) If you pass the desired folder name to the list, it will work.
And if you want to go to the screen to select a photo right away without AlbumList, you can use the isStartInAllView(true) function.
Can you use this alpha version and tell me if the function you want is correct?

@talosan
Copy link

talosan commented Mar 31, 2020

Great job. Again, thank you very much for everything.
I'm going to test the new functionality right now.

@talosan
Copy link

talosan commented Mar 31, 2020

I've already tried it. It works perfectly. In my case like this:

.setSpecifyFolderList(Collections.singletonList("Emoji"))

I am very grateful

@talosan
Copy link

talosan commented Mar 31, 2020

To make it even more perfect, ideally, it should be displayed directly within the selected folder. As it is right now it is not bad, the name of the folder that you want is listed, but you have to click on the name to enter, but it would be good if it were displayed inside the folder directly.

This could be a functionality added to the previous one.

@talosan
Copy link

talosan commented Mar 31, 2020

Example:

Now:

Screenshot_20200331-163945_Sticker Maker

Ideal option:

Screenshot_20200331-163954_Sticker Maker

@NokisDemox
Copy link
Author

This was the feature I needed thanks a lot to everyone, also i think is a really good feature in generic use, so this galery can be even greater over time

@sangcomz
Copy link
Owner

sangcomz commented Apr 1, 2020

@talosan
isStartInAllView (true) You can use this function.

@talosan
Copy link

talosan commented Apr 1, 2020

@sangcomz
I just tried it, and indeed it works perfect:

isStartInAllView (true)

Thanks again!!!

@sangcomz
Copy link
Owner

sangcomz commented Apr 1, 2020

I will release soon.
@talosan
If the app you are developing is okay, can I put it on the Readme.md page?

@talosan
Copy link

talosan commented Apr 1, 2020

I am developing the application well, but it is not synchronized with github.

I will try to synchronize it, and when it is I will put it in the Readme.md file.

Fishbun has been a great help in the development of my app.

@moisb
Copy link

moisb commented Jun 9, 2023

Does anyone have any idea how I can list images from a folder inserted inside my app 'assets' or 'raw' folder, as if it were an album for fishbun? as an additional option to the "Screenshots", "Camera" etc folders.
My image dir is: \app\src\main\assets\stock_images
I tried:

private void openAlbum(int code) {
        FishBunCreator fishBunCreator = FishBun.with(UploadActivity.this)
                .setImageAdapter(new GlideAdapter())
                .setActionBarColor(Color.parseColor("#ffffff"), Color.parseColor("#ffffff"), true)
                .setActionBarTitleColor(Color.parseColor("#ffffff"))
                .setActionBarColor(getResources().getColor(R.color.colorAccent))
                .setActionBarTitle(getString(R.string.msg_album_actionbartitle_fishbun))
                .setMaxCount(1)
                .setMinCount(1)
                .setReachLimitAutomaticClose(true)
                .setPickerSpanCount(3)
                .hasCameraInPickerPage(true)
                .textOnImagesSelectionLimitReached(getString(R.string.msg_album_limit_fishbun))
                .textOnNothingSelected(getString(R.string.msg_album_nadaselecionado_fishbun))
                .setAllViewTitle(getString(R.string.msg_album_allview_fishbun))
                .setAlbumThumbnailSize(300)
                .exceptGif(true);
        File stockImagesDirectory = new File(getExternalFilesDir(null), "stock_images");
        if (stockImagesDirectory.exists() && stockImagesDirectory.isDirectory()) {
            fishBunCreator.setSpecifyFolderList(Collections.singletonList(stockImagesDirectory.getAbsolutePath()));
        }
        fishBunCreator.startAlbumWithOnActivityResult(code);
    }

but without success. Only the smartphone storage albums are shown with this code.

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

No branches or pull requests

4 participants