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

假装没事ソ 提交于 2019-12-08 12:26:23

问题


I have a Windows Phone 8 App, which is Live on 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

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. I need to solve this issue so they can use it for capturing images.

Can someone suggest, how to solve this issue?


回答1:


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. For your scenario, you may wantt o upgrade to a Windows 10 UWP app and use CameraCaptureUI




回答2:


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.


来源:https://stackoverflow.com/questions/39347658/cameracapturetask-of-windows-phone-8-app-is-not-working-in-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!