by Pete Glass
Toggles the camera flash on and off when the home button is pressed twice within 0.3 seconds (a fast double-click, delay can be customized in block 14). If the flashlight is still on after 1 minute a dialog appears and asks if you would like to keep the flashlight on and the dialog will tiemout after 15 seconds and turn off the flashlight automatically if a response is not received to prevent damage to your camera flash.
Note: The screen must be unlocked to detect home button clicks to toggle the flashlight.
* * * Created by Pete Glass * * *