Skip to main content

Turn off flashlight (device.flash_off)

Declaration​

ok = device.flash_off()

Returns​

  • ok
    Boolean. true when the device has flashlight hardware and the camera is accessible; false otherwise.

Description​

iPad Pro flashlight cannot be turned on
If the flashlight is on, this function turns it off; otherwise does nothing

Example​

if device.flash_off() then
-- device has flashlight
else
-- device has no flashlight
end