title: How to make android phone flashlight blink?
body: <p>I am trying to make the LED flashlight of android phone blink based on binary code like if char = 1 turn LED light on else if char = 0 turn LED off.</p>
  
  <pre><code>if ( char == '1'){ params.setFlashMode(Parameters.FLASH_MODE_ON); }              
  if ( char == '0'){ params.setFlashMode(Parameters.FLASH_MODE_OFF);}
  </code></pre>
  
  <p>So I get the char from a <code>String str ="101010101"</code> the char gets the values 1, 0, 1 and so on, which is supposed to make the flashlight blink, however it blinks ones and that's it. How should I fix this problem?.
  Thanks </p>