Unable to reach the PhotoCamera
Tried all the examples from the internet , do not work. Help start the camera in any way , please.
Unable to reach the PhotoCamera
Tried all the examples from the internet , do not work. Help start the camera in any way , please.
Use Microsoft.Devices.PhotoCamera()
in Windows Phone Silverlight project.
While use Windows.Media.Capture.CameraCaptureUI
API to capture a photo in winrt project.
Under AppManifest.xml --> Capabilites --> Tick ID_CAP_ISV_CAMERA give this permission to your app.
CameraCaptureTask cameraCaptureTask = new CameraCaptureTask();
cameraCaptureTask.Completed += new EventHandler<PhotoResult>(cameraCaptureTask_Completed);
cameraCaptureTask.Show();
void cameraCaptureTask_Completed(object sender, PhotoResult e)
{
try
{
if (e.TaskResult == TaskResult.OK)
{
// your code after get image capture
}
}
catch (Exception ex)
{
}
}