I'm trying to turn the camera flash on my WP7 on permanently.
Using:
PhotoCamera cam = new Microsoft.Devices.PhotoCamera(CameraType.Primary);
cam.FlashMode = FlashMode.On;
as suggested on MSDN makes the camera flash when a photo is taken.
How do i get the flash to turn on and off on demand? There's a heart rate monitor app on the marketplace that does this - and it isn't made by an OEM with special permissions, so I know it's possible.
Thanks!
Well Ill tell you how to do it the easy (free) way.
private VideoCamera _VideoCamera;
public Start()
{
VideoCamera = new VideoCamera();
VideoCamera.Initialized += (___, ____) =>
{
VideoCamera.LampEnabled = true;
VideoCamera.StartRecording();
};
}
See all your doing is turning on the camera and not showing it on the screen.
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