- Operating mode of the LEDs
In french: LEDAllume
Switches the LED (Light-Emitting Diode) of the device on. This LED can be switched off by LEDSwitchOff
- The device must be equipped with a LED.
- This function has no effect in the simulator or in the emulator.
// Switch on the diode in red for 1 second
// Turn off LED
LEDSwitchOn(<Color> [, <Duration> [, <Blinking>]])
Color of the LED. This color can correspond to: Caution: Some devices do not allow you to modify the LED color or they do not propose all the colors. A default color (or a similar color) will be used if the specified color is not supported by the device.
<Duration>: Optional integer or optional Duration
Duration (in milliseconds) during which the diode must be switched on.
This parameter can correspond to:
- If this parameter is set to 0, the diode will be switched on until the call to LEDSwitchOff or until the application is closed.
- If this parameter is not specified, the diode will be switched on during 3 seconds.
- an integer corresponding to the number of milliseconds,
- a Duration variable,
- the duration in a readable format (e.g., 1 s or 10 ms).
<Blinking>: Optional boolean
- True if the LED must blink,
- False (default value) if the LED must be fixed. The blinking frequency can change from a device to another one.
Operating mode of the LEDs
The operating mode of the LEDs differs according to the type of device used:
- Some devices do not allow you to modify the LED color or they do not propose all the colors. A default color (or a similar color) will be used if the specified color is not supported by the device.
- On some devices, the LED is switched on only when the screen is switched off.
- On some devices, when they are linked to the PC by USB or plugged in, the LED is used as charge warning light. In this case, LEDSwitchOn has no effect.
- The lighting of the LED will be interrupted if the user expands the window of notifications on the device.