PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Operating mode of the LEDs
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Switches the LED (Light-Emitting Diode) of the device on. This LED can be switched off by LEDSwitchOff.
Caution:
  • The device must be equipped with a LED.
  • This function has no effect in the simulator or in the emulator.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Example
// Switch on the diode in red for 1 second
LEDSwitchOn(LightRed, 1000)

// Switch the LED off
LEDSwitchOff()
Syntax
LEDSwitchOn(<Color> [, <Duration> [, <Blinking>]])
<Color>: Integer
Color of the LED. Corresponds 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.
  • 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.
This parameter can correspond to:
  • an integer corresponding to the number of milliseconds,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s or 10 ms for example).
    New in version 23
    the direct indication of duration (1 s or 10 ms for example).
    the direct indication of duration (1 s or 10 ms for example).
<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.
Remarks

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 into the mains, 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.
Components
Android wd230android.jar
Minimum required version
  • Version 16
Comments
Click [Add] to post a comment