This sample utilizes a custom Cordova plugin that allows you to control devices with flashlight.