title: How does CameraX library can turn ON/OFF the torch?
body: <p>I am developing a feature with the possibility of switching the torch into ON/OFF states. Some days ago, we saw a new library from Google in <strong>io2019</strong>. I came up with an idea, why not use it.</p>
  
  <p>After some time, <strong>I don't see any possibilities</strong> to use the only torch from the library. </p>
  
  <p>Even in the official documentation, I wasn't able to find any good pieces of information for me, what's more, the sample app from their also don't have to handle my case.</p>
  
  <p><strong>Do you have something in mind what is easy to implement or perhaps you know how to do it with CameraX?</strong></p>
  
  <p>I am worried about using camera or camera2 because the amount of code to be paste is terrible.</p>
  
  <p><strong>Links</strong>:</p>
  
  <p>[1] <a href="https://developer.android.com/training/camerax" rel="noreferrer">https://developer.android.com/training/camerax</a></p>
  
  <p>[2] <a href="https://proandroiddev.com/android-camerax-preview-analyze-capture-1b3f403a9395" rel="noreferrer">https://proandroiddev.com/android-camerax-preview-analyze-capture-1b3f403a9395</a></p>
  
  <p>[3] <a href="https://github.com/android/camera/tree/master/CameraXBasic" rel="noreferrer">https://github.com/android/camera/tree/master/CameraXBasic</a></p>
  
  <p>[4] <a href="https://github.com/android/camera/tree/master/CameraXBasic" rel="noreferrer">https://github.com/android/camera/tree/master/CameraXBasic</a></p>
  
  <p><em>CameraX is an Android Jetpack library that was built with the intent to make camera development easier.</em></p>