Closed lobbo232 closed 2 years ago
Any devs or community members still active on this project? @dimonovdd @catchertinator
Hello. This works great in sample project. Are you sure you are doing everything as described in the readme?
Hello @dimonovdd,
I have attached a sample project for you to recreate the issue. Xam_savetogallery_not_working.zip
The SavePhotoFile
method performs some post processing which I've removed in the sample for simplicity as it didn't effect the result I was getting.
Curiously, if I exclude the processing method entirely and save the photo result directly from it's own stream then it does work, but that doesn't allow me to process the file.
await MediaGallery.SaveAsync(MediaFileType.Image, await photo.OpenReadAsync(), "test.png"); // works but skips processing
I think you just need to add a dot.
$"INSPCT_{photo.NameWithoutExtension}_{DateTime.Now.Ticks.GetHashCode():X}.{photo.Extension}"
Rookie mistake... thank you.
Description
I am having some trouble to get SaveAsync working on iOS and Android. I am trying to take a photo, and then save the photo to the gallery too.
When calling SaveAsync with the path of a photo recently taken using CapturePhotoAsync in the Xamarin.Forms shared project, it throws an exception on both iOS and Android/
Actual Behavior
SaveAsync iOS exception:
SaveAsync Android exception:
Expected behaviour
The image to be saved to the gallery and not throw an exception.
Steps to reproduce the behaviour
Screenshots or Videos
Reproduction Link
Configuration