I am developing an app in windows 8 that requires camera to capture picture. So what I need to do to know whether camera is present(Suppose assume that desktop doesn't have webcam, while windows 8 tablet has a camera), so I only need to show controls to show camera when camera is present on the device.
You need to use this API: JS:
Windows.Devices.Enumeration.DeviceInformation.findAllAsync(Windows.Devices.Enumeration.DeviceClass.videoCapture).done(yourHandler);
C#:
var interfaces = await DeviceInformation.FindAllAsync(selector, null);
foreach(DeviceInformation devInfo in interfaces) { /* stuff */ }
This has more information on the other aspects of this API
Since you are using c#, this sample will be more specific.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With