I'm attempting to use binary code to control the android phone's LED flashlight so that it will turn on and off depending on the value of a character.
if ( char == '1'){ params.setFlashMode(Parameters.FLASH_MODE_ON); }
if ( char == '0'){ params.setFlashMode(Parameters.FLASH_MODE_OFF);}
Consequently, I get the char from a String str ="101010101"; the char receives the values 1, 0, 1, and so on, and is supposed to cause the flashlight to blink, but all it does is blink one after another. How should I resolve this issue? Thanks