ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Operating mode of the LEDs
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 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,
  • 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: wd290android.jar
Minimum version required
  • Version 16
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help