Turns the device's flash on and off with timer, blinking mode, and SOS flashing.
Gif
TurnOnFlash
Turns on the device's flashlight.
TurnOffFlash
Turns off the device's flashlight.
TurnOnFlashForDuration
Turns on the flashlight for a specified duration (in milliseconds) and automatically turns it off afterward.
FlashSpeed
Sets the flashing speed (in milliseconds) for strobe mode.
StartFlashing
Starts the flashlight strobe (blinking) mode.
StopFlashing
Stops the flashlight strobe (blinking) mode.
StartSOS
Activates the SOS emergency signal (Morse code pattern).
StartCustomPattern
Plays a custom flash pattern (list of millisecond durations).
Example:
If the pattern [300, 700]
is entered:
- The flash is turned on for 300 ms.
- It is turned off for 700 ms.
- It repeats indefinitely until the StopFlashing function is called.
Another example:
If you use the pattern [300, 700, 200, 1000, 100]
:
Pattern Cycle:
- On for 300 ms.
- Off for 700 ms.
- On for 200 ms.
- Off for 1000 ms.
- On for 100 ms.
- Off for 300 ms. Return to the beginning of the pattern!
- On for 700 ms.
- Off for 200 ms.
And so on until stopped with StopFlashing.
Each value in the list alternates between on and off. An even number (0, 2, 4
) is on, and an odd number (1, 3, 5
) is off.
IsFlashOn
Returns the current flashlight state (on/off).
IsFlashing
Returns whether strobe (blinking) mode is active.
FlashStateChanged
Triggered when the flashlight state changes (on/off).
FlashError
Triggered when a flashlight error occurs.
FlashingStarted
Triggered when strobe (blinking) mode starts.
FlashingStopped
Triggered when strobe (blinking) mode stops.
SOSStarted
Triggered when SOS mode starts.
CustomPatternStarted
Triggered when a custom flash pattern starts.
v1.0 July 13, 2025.
Flashlight.aia (13.1 KB)
joejsanz.joedevflashlight.aix (9.5 KB)
JDK: 11
Minimum API Level: 21
Updated On: 2025-07-13T07:00:00Z
Built using: FAST-CLI v3.8.1-premium
Thanks.