I'm new to Xamarin and Xamarin Forms. I do not understand how come the method "TakePhotoAsync" of plugin Xam.Plugin.Media return null lifting up a System.NullReferenceException. Variable media is correctly initialized. This is part of the code:
var file = await media.TakePhotoAsync(new StoreCameraMediaOptions
{
DefaultCamera = CameraDevice.Rear,
Directory = "TestPhoto",
Name = "Photo.jpg",
SaveToAlbum = true
});
Exactly variable file is null, why?!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.