To turn the camera flash on and off, the application makes use of the Flash mode of the device's camera.
This will not work on a device that does not support any camera flash. But this will be checked for the application to work.
Feel free to use this source code to modify or deploy to your own app.