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?
camera = Camera.open();
parameters = camera.getParameters();
parameters.setFlashMode(Parameters.FLASH_MODE_TORCH);
camera.setParameters(parameters);
Thread.sleep(user decided period);