ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Attention : This is version 26 of this documentation page. This feature may have been changed or removed in a higher version.
Help / WLanguage / WLanguage functions / Standard functions / Mobile Device (Pocket PC) access functions
  • Battery
  • Managing errors
  • Various
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
cePowerStatus (Function)
In french: ceEtatAlimentation
Used to get various information about the main or secondary battery of the Mobile Device (Pocket PC). This Mobile Device is connected to the current computer.
Remarks:
  • To find out the status of the batteries found on the Mobile Device connected to the current computer, a connection must be established between the current computer and the Mobile Device (ceConnect).
  • This function is available in 64-bit mode.
Example
// Establish a connection with the Mobile Device
ceConnect()
// Process
...
// Status of main battery?
Info("The battery is loaded at: " + ...
cePowerStatus(ceChargePercentage) +  "%")
Syntax
<Result> = cePowerStatus(<Type of information> [, <Battery>])
<Result>: Integer or boolean according to the type of information
  • Requested information,
  • Empty string ("") if the requested information is not available on the Mobile Device.
<Type of information>: Integer constant
Specifies the requested type of information:
ceCharging
  • True if the battery is charging,
  • False otherwise.
ceChargeLevelCharge level of battery:
  • 0: battery not found.
  • 1: high level.
  • 2: low level.
  • 3: critical level.
ceChargePercentagePercentage of battery load.
ceACLineStatus
  • True if the Mobile Device is plugged in,
  • False otherwise.
ceRemainingLifeRemaining lifetime (in seconds) of battery.
ceTotalLifeTotal lifetime (in seconds) of battery.
<Battery>: Optional boolean
  • True (by default) to get information about the main battery of the Mobile Device,
  • False to get information about the secondary battery of the Mobile Device.
Remarks

Battery

  • Depending on the Mobile Device used, some information is not returned.
  • Some Mobile Devices do not have batteries.

Managing errors

Caution: cePowerStatus returns no error code. To find out if this function has generated an error, use ErrorInfo with the errMessage constant.

Various

To find out the status of the battery in a WINDEV Mobile application, use PowerStatus.
Component: wd260ce.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/26/2021

Send a report | Local help