我正在 Windows Phone 8 中开发一个应用程序。基本上在我的应用程序中,我使用PhotoCaptureDevice
API 来拍摄快照和扫描条形码。当我继续使用硬件后退按钮继续返回相机页面时,有时相机页面会挂起并且无法继续进行。
The code snippet used is :
//Passing Videobrush to PhotoCapturedevice
VideoBrush brush;
brush.SetSource(_device);
//PhotoCapture Device Intialization
internal PhotoCaptureDevice _device;
CameraSensorLocation cameraLocation;
if (PhotoCaptureDevice.AvailableSensorLocations.Contains(CameraSensorLocation.Back))
{
var supportedResolutions = PhotoCaptureDevice.GetAvailableCaptureResolutions(CameraSensorLocation.Back);
_initRes = GetBestResolution(supportedResolutions);
cameraLocation = CameraSensorLocation.Back;
}
else if (PhotoCaptureDevice.AvailableSensorLocations.Contains(CameraSensorLocation.Front))
{
var supportedResolutions = PhotoCaptureDevice.GetAvailableCaptureResolutions(CameraSensorLocation.Front);
_initRes = GetBestResolution(supportedResolutions);
cameraLocation = CameraSensorLocation.Front;
}
你能帮我解决这个问题吗