FishBun icon indicating copy to clipboard operation
FishBun copied to clipboard

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

Open NokisDemox opened this issue 4 years ago • 19 comments

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.

NokisDemox avatar Mar 13 '20 15:03 NokisDemox

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?

sangcomz avatar Mar 22 '20 06:03 sangcomz

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.

talosan avatar Mar 27 '20 18:03 talosan

@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. 🤔

sangcomz avatar Mar 28 '20 04:03 sangcomz

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.

talosan avatar Mar 29 '20 19:03 talosan

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

sangcomz avatar Mar 30 '20 12:03 sangcomz

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

Thanks again for your interest.

talosan avatar Mar 30 '20 13:03 talosan

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

Thanks for suggesting an interesting feature. 😃

sangcomz avatar Mar 30 '20 13:03 sangcomz

Thank you for your amazing work!

talosan avatar Mar 30 '20 13:03 talosan

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?

sangcomz avatar Mar 31 '20 13:03 sangcomz

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

talosan avatar Mar 31 '20 13:03 talosan

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

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

I am very grateful

talosan avatar Mar 31 '20 14:03 talosan

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 avatar Mar 31 '20 14:03 talosan

Example:

Now:

Screenshot_20200331-163945_Sticker Maker

Ideal option:

Screenshot_20200331-163954_Sticker Maker

talosan avatar Mar 31 '20 14:03 talosan

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

NokisDemox avatar Mar 31 '20 22:03 NokisDemox

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

sangcomz avatar Apr 01 '20 00:04 sangcomz

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

isStartInAllView (true)

Thanks again!!!

talosan avatar Apr 01 '20 00:04 talosan

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

sangcomz avatar Apr 01 '20 03:04 sangcomz

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.

talosan avatar Apr 01 '20 09:04 talosan

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.

moisb avatar Jun 09 '23 17:06 moisb