title: How to use cameraManager.setTorchMode(cameraId, false); in API21
body: <p>This is the code :</p>
  
  <pre><code>    public void turnOnFlashLight() {
          try {
              if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {
                  cameraManager.setTorchMode(cameraId, true);
                  playOnOffSound();
                  powerButton.setImageResource(R.drawable.b3);
              }
          } catch (Exception e) {
              e.printStackTrace();
              Toast.makeText(Flash_main.this,"onFunction",Toast.LENGTH_SHORT).show();
          }
      }
  
      public void turnOffFlashLight() {
  
          try {
              if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {
                  cameraManager.setTorchMode(cameraId, false);
                  playOnOffSound();
                  powerButton.setImageResource(R.drawable.b4);
  
              }
  
          } catch (Exception e) {
              e.printStackTrace();
              Toast.makeText(Flash_main.this,"offFunction",Toast.LENGTH_SHORT).show();
          }
      }
  </code></pre>
  
  <p>I am running android studio </p>
  
  <p>please help, I want to make this app for android 5.0 and above but </p>
  
  <pre><code>cameraManager.setTorchMode(cameraId, true);
  </code></pre>
  
  <p>but this library supports Android 6.0 and above</p>
  
  <p>Any Alternative Please!</p>