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

Essentials - MediaPicker add method to select multiple images #6903

Open
janseris opened this issue May 6, 2022 · 39 comments
Open

Essentials - MediaPicker add method to select multiple images #6903

janseris opened this issue May 6, 2022 · 39 comments
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info proposal/open
Milestone

Comments

@janseris
Copy link

janseris commented May 6, 2022

Description

Currently for images/photos, there is MediaPicker class with PickPhotoAsync and CapturePhotoAsync methods available.
PickPhotoAsync only selects 1 image at a time from gallery.
However, for FilePicker, there is PickMultipleAsync method available.

It should be possible to select multiple images, too.

Temporary workaround:

  • probably via FilePicker.PickMultipleAsync with some image types restriction but that is unneccessary complexity

Public API Changes

MediaPicker class: add PickMultiplePhotosAsync or similar method

Intended Use-Case

pick multiple images from gallery

@janseris janseris changed the title Essentials MediaPicker select multiple images Essentials MediaPicker add method to select multiple images May 6, 2022
@janseris janseris changed the title Essentials MediaPicker add method to select multiple images Essentials - MediaPicker add method to select multiple images May 6, 2022
@Eilon Eilon added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label May 6, 2022
@AbstractionsAs
Copy link

Is there any ETA on this?

@janseris
Copy link
Author

janseris commented Aug 18, 2022

@AbstractionsAs This is not an answer to your question but I suggest you add like reaction to the post to push it upwards in priority. A lot of .NET GitHub works like this.

@johanlangevillecab
Copy link

It would also be nice to have a CapturePhotosAsync to take multiple photos without closing the camera

@ctigrisht
Copy link

I fully support this, it should have been a basic feature

@nathanjeynes
Copy link

This is needed and was available in the Xamarin forms essentials, not sure why this has been left out but its a key feature that many apps rely on.

@antiGithub
Copy link

I would also need this feature very badly

@mattleibow mattleibow added this to the Backlog milestone Feb 4, 2023
@ghost
Copy link

ghost commented Feb 4, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@nc-kano
Copy link

nc-kano commented Aug 18, 2023

Currently we can only select images OR videos so also option for images AND videos would be nice.

@harima34
Copy link

harima34 commented Nov 4, 2023

Any news ?
There is no way for filepicker to access album photo ? (at least for ios)
Or a way for CrossMedia can select multiple file ?
It would be nice

@Brosten
Copy link

Brosten commented Dec 12, 2023

The camera and photo selection parts really needs to be better in MAUI. I just learned that another team close to me picked another framework in favor of .net MAUI with the lack of good photo support as the major reason. Too bad MediaGallery (https://github.com/dimonovdd/Xamarin.MediaGallery) seems abandoned. Last commit 10 months ago.

@shingming
Copy link

shingming commented Dec 12, 2023

The camera and photo selection parts really needs to be better in MAUI. I just learned that another team close to me picked another framework in favor of .net MAUI with the lack of good photo support as the major reason. Too bad MediaGallery (https://github.com/dimonovdd/Xamarin.MediaGallery) seems abandoned. Last commit 10 months ago.

I agree the photo picker in MAUI is very needs to be enhanced. The MediaGallery you mentioned is not abandoned and is currently good to go in the MAUI project. (I use it in my MAUI pj, too)
In current situation, I think MediaGallery is the good solution.

image

@Simo4565
Copy link

I would also need this feature

@mnidhk
Copy link

mnidhk commented Apr 4, 2024

is there a workaround or still no option to pick multiple images?

@shingming
Copy link

shingming commented Apr 4, 2024

@mnidhk

Currently, I use this plugin in my .NET MAUI project to implement the multiple selection, and this works fine for me: https://github.com/dimonovdd/Xamarin.MediaGallery

@Odaronil
Copy link

I need this too! Microsoft pay attention!

@johannes-steurer
Copy link

yes, definitly needed

@samanson123
Copy link

Would be a very useful built in option. I'm having to use Xamarin.MediaGallery as a workaround same as many others.

@hernandoz
Copy link

This is an essential functionality for most enterprise apps, this should be a priority for the MAUI Team .

@SteHiggins
Copy link

We really need this. Is there an ETA?

@janseris
Copy link
Author

janseris commented Apr 30, 2024

We really need this. Is there an ETA?

MAUI's development is ~dead
Realistic perspective from a person who has been following it for 2 years (since 4 months before its release) and judging by what and how many issues have been or are being fixed and what embarrassing issues which we did not think were possible in a production UI framework our developers and me have been encountering and still are encountering).
Fixes or new features which are released are negligible and take years even if they are important because there are few developers included and this has not changed much in these 2 years.

@mackayn
Copy link

mackayn commented Apr 30, 2024

Xamarin media gallery can be ported to .NET8 for now, just done this for a project to get multi-photos select unblocked.

https://github.com/dimonovdd/Xamarin.MediaGallery

@waldevelop
Copy link

Hi Mackayn
how di you convert it to .NET 8? In Visual Studio I don't find this option and It's not possible to build it for Net 6

@samanson123
Copy link

Hi Mackayn
how di you convert it to .NET 8? In Visual Studio I don't find this option and It's not possible to build it for Net 6

Downloaded the latest version of the Nuget package in your .NET 8 project.

@mackayn
Copy link

mackayn commented Jul 8, 2024

Hi Mackayn
how di you convert it to .NET 8? In Visual Studio I don't find this option and It's not possible to build it for Net 6

Downloaded the latest version of the Nuget package in your .NET 8 project.

That didn't work for me anyway, it wouldn't compile. I manually changed the framework references to .NET8 in the proj file, there's a LOT of compilers redirections to support portable & .NET8, we made some small tweaks for deprecated iOS calls but it's not a package as such, just a solution project, also had to stub a few interface implementations to allow it to compile .NET8 so the app could be unit tested but if you don't have to do that, you don't need to worry about it.

@mackayn
Copy link

mackayn commented Jul 8, 2024

We really need this. Is there an ETA?

MAUI's development is ~dead Realistic perspective from a person who has been following it for 2 years (since 4 months before its release) and judging by what and how many issues have been or are being fixed and what embarrassing issues which we did not think were possible in a production UI framework our developers and me have been encountering and still are encountering). Fixes or new features which are released are negligible and take years even if they are important because there are few developers included and this has not changed much in these 2 years.

It has it's challenges but just finished porting a large enterprise SAAS app to MAUI successfully.

@mackayn
Copy link

mackayn commented Jul 8, 2024

Hi Mackayn how di you convert it to .NET 8? In Visual Studio I don't find this option and It's not possible to build it for Net 6

I manually changed the csroj files and compiler redirections in code to .NET8. You need to get your hands dirty under the hood. This package could be updated pretty easily to support .NET8. There's a few other things that might need tweaking.

@endeakidz
Copy link

This should be the highest priority for MAUI iOS / Android development.

@MitchBomcanhao
Copy link

This should be the highest priority for MAUI iOS / Android development.

This should be the highest priority for MAUI iOS / Android development.

@h0lg
Copy link

h0lg commented Sep 4, 2024

It would also be nice to have a CapturePhotosAsync to take multiple photos without closing the camera

Agreed! It could be introduced into the UI flow as a third option of the dialog you get after taking a photo: Retake | Use Photo | Use and take another

@Alex-Dobrynin
Copy link
Contributor

Hi guys, using this one lib for picking media files MPowerKit.MediaPlugin. Works like a charm. https://github.com/MPowerKit/MediaPlugin

@ichimukuren
Copy link

I support this issue. The ability to select multiple images in one action would be very helpful. Using FilePicker.PickMultipleAsync as a workaround adds unnecessary complexity, especially when only images are needed. Adding a method like PickMultiplePhotosAsync in the MediaPicker class would simplify this process significantly.

@h0lg
Copy link

h0lg commented Oct 31, 2024

You can currently work around this by re-triggering the taking of a single photo until the user cancels:

private async Task TakePhoto()
{
    var photo = await MediaPicker.Default.CapturePhotoAsync();

    if (photo != null)
    {
        await SavePhotoAsync(photo);
        await Task.Delay(1000); // seems to be required for MediaPicker to open again
        await TakePhoto(); // keep taking photos until user cancels
    }
}

@Alex-Dobrynin
Copy link
Contributor

@h0lg if i would do this workaround, i probably could be fired few times

@h0lg
Copy link

h0lg commented Nov 2, 2024

@h0lg if i would do this workaround, i probably could be fired few times

@Alex-Dobrynin I think we can agree on that this is a bit of a cheeky work around :) Yet it achieves something close to the desired behaviour with the current MediaPicker API.
Obviously, it shows off capturing instead of picking - and you may want to consider making this mode an alternative to picking a single photo instead of the default. Adapt as you like.

Send my regards to your boss. Pragmatism is not for everyone :)

@Simoo23
Copy link

Simoo23 commented Nov 14, 2024

I need this too!

@waldevelop
Copy link

I tried to install this plugin from NuGet https://github.com/MPowerKit/MediaPlugin but it can't be installed on Windows. I can see it inside the IOS and Android packages after the installation but not inside Windows so I can't reference it inside the MauiProgram.cs file. Did someone experience the same problem ?

@Simoo23
Copy link

Simoo23 commented Nov 19, 2024

At the moment I'm using MediaGallery (https://github.com/dimonovdd/Xamarin.MediaGallery) but an official solution (with official support) will be better

@Alex-Dobrynin
Copy link
Contributor

@waldevelop you need to enable long file pathes in windows. You can read more here MPowerKit/Lottie#1

@waldevelop
Copy link

thanks @Alex-Dobrynin I tried to follow the suggestions but the problem is still there. I'll try to see if a PC reboot could be the solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info proposal/open
Projects
None yet
Development

No branches or pull requests