title: How i make blink flash camera light on/off in android?
body: <p>How i make blink flash camera light on/off?I try this with for loop but no work...freeze...
  Why?Need alarm manager?Thread runnable post delayed?</p>
  
  <pre><code> for(int i=0;i&lt;5;i++){
      flashon();
      try {
          Thread.sleep(1000);
      } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      flashoff();
      }       
   }
  
     public void flashon(){
     camera = Camera.open();
     Parameters p = camera.getParameters();
     p.setFlashMode(Parameters.FLASH_MODE_TORCH);
     camera.setParameters(p);
     camera.startPreview();
  }
  </code></pre>