I have done as the youtube video on PictureChooserTask (https://www.youtube.com/watch?v=Dyy6U67ouQI&list=PLR6WI6W1JdeYSXLbm58jwAKYT7RQR31-W&index=16) shows, and it all compiles, but when i push the "Take picture" button that calls the TakePicture-command the app crash and returns to the home screen.
My commands and methods:
private MvxCommand _takePictureCommand;
public ICommand TakePictureCommand
{
get
{
_takePictureCommand = _takePictureCommand ?? new MvxCommand(DoTakePicture);
return _takePictureCommand;
}
}
private void DoTakePicture()
{
_pictureChooserTask.TakePicture(400, 95, OnPicture, () => { });
}
private void OnPicture(Stream pictureStream)
{
var memoryStream = new MemoryStream();
pictureStream.CopyTo(memoryStream);
Bytes = memoryStream.ToArray();
}