Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to make the flash light auto activate when the camera was activate?

$
0
0

Hello, How to make the flash light auto activate when the camera was activate?

I include the flash light function but the camera cannot working well, so how to make it this two function carry simultaneously?
Below is my code, can anyone share me ideas?

            CrossMedia.Current.Initialize();
            if (!CrossMedia.Current.IsTakePhotoSupported && !CrossMedia.Current.IsTakeVideoSupported)
            {
                DisplayAlert("Message", "Photo Capture and Pick Not supported", "ok");
                return;
            }
            else
            {

                CrossLamp.Current.TurnOn();

                var file = CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
                {
                    //DefaultCamera = Plugin.Media.Abstractions.CameraDevice.Front,
                    CompressionQuality = 92,
                    SaveToAlbum = true,
                    Directory = "Image",
                    Name = DateTime.Now + "_test.jpg"
                });

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>