title: how to stop our blinking flashlight in android
body: <p>I am making a app flashlight.....but i want to stop my blinking led flashlight ...this is my code but i am not able to stop my blinking flashlight..</p>
  
  <pre><code>String  myString = "010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101011";
  long blinkDelay = 50;
  
  for (int i = 0; i &lt; myString.length(); i++) {
      if (myString.charAt(i) == '0') {
          p.setFlashMode(Parameters.FLASH_MODE_TORCH);
          cam.setParameters(p);
      }
      else {
          p.setFlashMode(Parameters.FLASH_MODE_OFF);
          cam.setParameters(p);
      }
      Thread.sleep(blinkDelay);
  }
  }catch (Exception e) {
  }
  </code></pre>