ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Operating mode of the LEDs
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
Example
// Switch on the diode in red for 1 second
LEDSwitchOn(LightRed, 1000)
 
// Turn off LED
LEDSwitchOff()
Syntax
LEDSwitchOn(<Color> [, <Duration> [, <Blinking>]])
<Color>: Integer
Color of the LED. This color can correspond to: Caution: Some devices do not allow LED color changes or only offer certain 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 representing 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.
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 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.
Component: wd300android.jar
Minimum version required
  • Version 16
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help