How to set the flashlight/screen light turn on for different time periods based on user requirement?
<p>Am developing an flashlight application in which I want to give option to set the timer for the flashlight to the user.
This is the code for the flash to be on:
How I could implement it for 2 minutes, 3 minutes etc?</p>

<pre><code>camera = Camera.open();
parameters = camera.getParameters();
parameters.setFlashMode(Parameters.FLASH_MODE_TORCH);
camera.setParameters(parameters);
</code></pre>
