[英]Method “TakePhotoAsync” of Xam.Plugin.Media return null on platform WinPhone in Xamarin.Forms
I'm new to Xamarin and Xamarin Forms. 我是Xamarin和Xamarin Forms的新手。 I do not understand how come the method "TakePhotoAsync" of plugin Xam.Plugin.Media return null lifting up a System.NullReferenceException.
我不明白插件Xam.Plugin.Media的方法“ TakePhotoAsync”为什么会返回null从而提升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?! 变量文件恰好为空,为什么?!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.