How to save images to gallery in xamarin forms using plugins

1.1k views Asked by At

I want to save images to gallery which is in the drawable folder. I built an app to take pictures and save it in the gallery in xamarin forms by using the following article.

https://xamarinhelp.com/use-camera-take-photo-xamarin-forms/

 private async void SaveButton_Clicked(object sender, EventArgs e){                                                                              
  var photo = await Plugin.Media.CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions()
        {
            PhotoSize = PhotoSize.Medium,
            CompressionQuality = 92,
            SaveToAlbum = true, //saves to image gallery
            Directory = "MyFolder2",
            Name = $"{DateTime.Now}_documenttypeXYZ.jpg"
        });
 }

the above article is using media plugin https://github.com/jamesmontemagno/MediaPlugin/blob/master/README.md#saving-photovideo-to-camera-rollgallery to take pictures and save it.

But i don't know how to save the images to gallery which are in the drawable folder.

0

There are 0 answers