Reputation: 6776
I am using Xam.Media.Plugin to take pictures. The following is a snippet of my function:
public async Task<string> TakePhoto(string orderNr)
{
...
var mediaOptions = new StoreCameraMediaOptions()
{
CompressionQuality = 25,
PhotoSize = Plugin.Media.Abstractions.PhotoSize.Custom,
CustomPhotoSize = 75,
Directory = $"Order_{orderNr}"
};
var file = await CrossMedia.Current.TakePhotoAsync(mediaOptions);
}
After the order is completed, I want to delete the entire folder with all of the pictures that were saved. How do I retrieve the path of the folder? I want to avoid getting the path after the picture is taken.
Upvotes: 0
Views: 568
Reputation: 89102
on Android,
Environment.DirectoryPictures
on iOS
Environment.SpecialFolder.Personal
from Github
Upvotes: 1
Reputation: 2899
To get the private path var privatePath = file.Path;
To get the public Album path var publicAlbumPath = file.AlbumPath;
Reference: Documentation sample project
Upvotes: 0