by Daniel Ohayon
FlashXimity is a smart LED-flash that will trigger the camera-LED flashlight ON when proximity sensor is near/or at 0cm , meaning you just have to cover the sensor for the flashlight to work.
Remove proximity from the sensor to turn the flash off.
Update1: Added a loop to check whether you're on a call so the main flash loop won't be called.
Update2: Added log output for call states.