title: LED Flashlight does not work on Samsung Galaxy Nexus
body: <p>I've got the following problem:
  My Flashlight app works fine on my Samsung Galaxy S2 but unfortunately not on the Samsung Galaxy Nexus (problem: flashlight ignores the button-click -> no reaction, no light, no crash, no exception). I've read "LED flashlight on Galaxy Nexus controllable by what API?" here in stackoverflow but it did not help me since my problem still occures.
  This is my code-snippet to control the light:</p>
  
  <pre><code>final Button FlashLightControl = (Button)findViewById(R.id.ledbutton);
  FlashLightControl.setOnClickListener(new Button.OnClickListener()
  {
          public void onClick(View arg) 
          {
              if(camera != null)
              {
                  //in case light is on we will turn it off
                  parameters = camera.getParameters();
                  parameters.setFlashMode(Parameters.FLASH_MODE_OFF);
                  camera.setParameters(parameters);
                  camera.stopPreview();
                  camera.release();
                  camera = null;
              }
              else
              {
                  // light is off - we turn it on
                  camera = Camera.open();
                  parameters = camera.getParameters();
                  parameters.setFlashMode(Parameters.FLASH_MODE_TORCH);
                  camera.setParameters(parameters);
                  camera.startPreview();
              }
          }}); 
  </code></pre>
  
  <p>Any ideas? For the sake of completeness - these are the permissions I added to the  Androidmanifest.xml:</p>
  
  <pre><code>    &lt;uses-feature android:name="android.hardware.camera.flash" /&gt;
  &lt;uses-sdk android:minSdkVersion="7" /&gt;
  &lt;uses-permission android:name="android.permission.CAMERA"/&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK"/&gt;
  </code></pre>
  
  <p>Can someone help?</p>
  
  <p>Kind regards,
  CarpeTemporem</p>