Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turning the WP7 flash on permanently

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!

like image 450
Cameron Avatar asked Dec 05 '25 11:12

Cameron


1 Answers

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.

like image 192
MyKuLLSKI Avatar answered Dec 07 '25 17:12

MyKuLLSKI



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!