To take a picture using the webcam in windows 8 app by clicking on a button , i have written the following code in c#:
private async void camera_Click_1(object sender, RoutedEventArgs e)
{
cam = new CameraCaptureUI();
await cam.CaptureFileAsync(CameraCaptureUIMode.Photo);
}
now the Camera app got opened when i clicked the button but it’s giving me a message:
This app needs permission to use your camera
you can change this in app's settings
What app’s settings should be changed?
With Using the Manifest Designer you need to add the following Capabilities into your
Package.appxmanifest:Note: The webcam capability only grants access to the video stream. In order to grant access to the audio stream as well, the microphone capability must be also added.