CameraCaptureTask of Windows Phone 8 App is not wo

2019-06-14 04:33发布

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?

2条回答
Deceive 欺骗
2楼-- · 2019-06-14 05:14

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

查看更多
Summer. ? 凉城
3楼-- · 2019-06-14 05:36

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.
查看更多
登录 后发表回答