Windows 10 Phone app Turn on flash (lamp)

474 views Asked by At

I have a problem. I m a new windows phone 10 developer and i have a problem.

How can i turn on flashlight on a Lumia 930 ? I can t find any answer on internet.

Thx alot, Regards

1

There are 1 answers

0
RoguePlanetoid On BEST ANSWER

The Windows.Devices.Lights.Lamp namespace is where you need to look, there's an example of Lamp usage in Windows 10 https://github.com/Microsoft/Windows-universal-samples/tree/master/lamp that might be of help. Here's a small example based on this as an alternative to the link:

using (var lamp = await Lamp.GetDefaultAsync()) 
{ 
    lamp.BrightnessLevel = 1.0F;
    lamp.IsEnabled = true;
}