简体   繁体   English

Windows Phone 8 App的CameraCaptureTask在Windows 10中不起作用?

[英]CameraCaptureTask of Windows Phone 8 App is not working in Windows 10?

I have a Windows Phone 8 App, which is Live on Windows Store. 我有一个Windows Phone 8应用程序,该应用程序在Windows Store上实时运行。 Now, recently I got a complaint from one of my Client that they are not able to capture Photo, only selection of Photo works from Gallery. 现在,最近,我收到一位客户的抱怨,他们无法捕获照片,只能从图库中选择照片作品。 This issue is appearing when they updated their device to Windows 10. I am using following code 他们将设备更新到Windows 10时出现此问题。我正在使用以下代码

private void CapturePhoto()
    {
        CameraCaptureTask cameraCapture = new CameraCaptureTask();
        cameraCapture.Completed += (sender, args) =>
        {
            //checking if everything went fine when capturing a photo
            if (args.TaskResult != TaskResult.OK)
                return;
            args.ChosenPhoto.Position = 0;
            string evidenceName = Path.Combine(Constants.IMAGES_FOLDER_PATH, "evidence_" + MCSExtensions.GetDateTimestamp() + ".jpeg");
            saveAndDisplayEvidence(args.ChosenPhoto, evidenceName);
        };
        cameraCapture.Show();
    }

I am already developing Windows 10 App as an update but till I update the app. 我已经在开发Windows 10应用程序作为更新,但是直到我更新了该应用程序。 I need to solve this issue so they can use it for capturing images. 我需要解决此问题,以便他们可以将其用于捕获图像。

Can someone suggest, how to solve this issue? 有人可以建议如何解决这个问题吗?

The UI on Windows 10 is "less than intuitive", and to take a picture using the CameraCaptureTask, the end user needs to use the ... in the app bar, and Choose location to select camera. Windows 10上的用户界面“不够直观”,要使用CameraCaptureTask拍照,最终用户需要使用应用程序栏中的... ,然后Choose location以选择相机。 For your scenario, you may wantt o upgrade to a Windows 10 UWP app and use CameraCaptureUI 对于您的方案,您可能不想升级到Windows 10 UWP应用并使用CameraCaptureUI

I had the same issue with my application as well. 我的应用程序也遇到了同样的问题。 You have to create your own camera capturing application You can go through the following links 您必须创建自己的相机捕获应用程序。可以通过以下链接进行操作

  1. Advanced Camera Application 先进的相机应用
  2. Basic Camera Application . 相机基本应用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM