title: Turn on flashlight
body: <p>I'm sorry for posting another question among all other simmilar ones but none of the questions that I've tried have worked. I'm trying to turn on the flashligh. Here is my manifest:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.CAMERA" /&gt;
  
  &lt;uses-permission android:name="android.permission.FLASHLIGHT"/&gt;
  
  &lt;uses-feature android:name="android.hardware.camera"
      android:required="false" /&gt;
  
  &lt;uses-feature android:name="android.hardware.camera.autofocus"
      android:required="false" /&gt;
  
  &lt;uses-feature android:name="android.hardware.camera.flash"
      android:required="false" /&gt;
  </code></pre>
  
  <p>And this is my code for turning the flashlight on:</p>
  
  <pre><code>    Camera cam = Camera.open();     
      Parameters p = cam.getParameters();
      p.setFlashMode(Parameters.FLASH_MODE_TORCH);
      cam.setParameters(p);
      cam.startPreview();
  </code></pre>
  
  <p>What is it that I'm doing wrong?</p>