Is there a way to add in the chat more than one image from the IOS gallery in one selection only ?
For Android I'm using
var customFileType = new FilePickerFileType(
new Dictionary<DevicePlatform, IEnumerable<string>>
{
{ DevicePlatform.iOS, new[] { "public.image" } }, // UTType values
{ DevicePlatform.Android, new[] { "image/jpeg", "image/png" } }, // MIME type
{ DevicePlatform.WinUI, new[] { ".jpeg", ".jpg" , ".png"} }, // file extension
//{ DevicePlatform.Tizen, new[] { "*/*" } },
//{ DevicePlatform.macOS, new[] { "cbr", "cbz" } }, // UTType values
});
myfoto = await FilePicker.Default.PickMultipleAsync(new PickOptions()
{
PickerTitle = "Seleziona immagini",
FileTypes = customFileType
});
and it's working perfectly
But using the same in iOS I'm not able to open the Iphone photo gallery instead using the MediaPicker I can only select one image
Is there any solution or workaround ?
Hi Walter Martin,
We regret to let you know that we don't have workaround in our SfChat control for this scenario since its not supported in .NET MAUI framework itself.
In above issue conversation, they suggested to use Xamarin Media gallery in Maui project to select multiple photos.
https://github.com/dotnet/maui/issues/6903#issuecomment-2037792365
Xamarin Media Gallery :
Regards,
Kamala Kannan S
I managed to use this library on Iphone to be able to select more than one image from the Iphone gallery
MPowerKit/MediaPlugin: Take & Pick Photos and Video Plugin for Xamarin and Windows
and then I added these images to a SfCarousel.
Everything is working perfectly as in my attachment
Since I need to send those images via email I have to find a way to clean the SfCarousel content after sending the images via email but the function below crashes the application (for index out of bound) only on Iphone because on Android it works perfectly
vm.ImageCollection.Clear();
Is there any workaround or suggestion to clean the datasource of a SfCarousel ?
Hi Walter Martin,
Thank you for reaching out to us. We are able to reproduce the reported issue on our end. Currently, we are investigating the reported issue, and we will provide further details on or before December 11, 2024. We appreciate your understanding and patience in the meantime.
Regards,
Aarthi A.
Hi Walter
Martin,
Thank you for your patience. We have resolved the reported issue, "Exception raised on iOS platform when clearing the ItemsSource collection of SfCarousel". This fix will be included in our upcoming weekly release on December 17, 2024. We will notify you once NuGet is released and appreciate your understanding and patience until that time.
Regards,
Aarthi A.
Hi Walter Martin,
We have included a fix for the reported issue, "Exception raised on iOS platform when clearing the ItemsSource collection of SfCarousel" in our latest weekly NuGet release, v28.1.35, which is now available for download (NuGet). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.
Regards,
Hariharan