Hello,
I'm using https://github.com/XLabs/Xamarin-Forms-Labs/wiki/Camera to take a picture and select it.
I can take a picture successfully and save it, but the problem is that the picture is saved in my application's directory("myAppName/Pictures") and the picture selector defaults in the device's default directory for camera pictures. So I can't select the pictures that I take from my application.
The code to select a picture is in my CameraPageViewModel:
private async Task SelectPicture()
{
Setup();
ImageSource = null;
try
{
var mediaFile = await _mediaPicker.SelectPhotoAsync(new CameraMediaStorageOptions
{
DefaultCamera = CameraDevice.Front,
MaxPixelDimension = 400,
Directory = "What goes here?"
});
ImageSource = ImageSource.FromStream(() => mediaFile.Source);
}
catch (System.Exception ex)
{
Status = ex.Message;
}
}
I see that the CameraMediaStorageOptions has a "Directory" property which looks like what needs to be modified.
My question is: what value do I need to put in the Directory property so that the picture selector defaults in "myAppName/Pictures"?
Thanks!