Reputation: 411
I am new to xamarin. I want to build a xamarin forms application to take picture and save it in the gallery. I built the app to take photo and display it by using the following article.
https://xamarinhelp.com/use-camera-take-photo-xamarin-forms/
But I don't know how to save the image in the gallery in xamarin forms.Can anyone help me to save the image using dependency service in xamarin forms?
Upvotes: 3
Views: 5119
Reputation: 13601
The article you shared uses MediaPlugin
by jamesmontemagno. It has its own comprehensive getting-started docs, that I would recommend to go through.
In order to save picture to gallery, you can use SaveToAlbum
in StoreCameraMediaOptions
.
var photo = await CrossMedia.Current.TakePhotoAsync(
new StoreCameraMediaOptions
{
SaveToAlbum = true
});
Upvotes: 3