PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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.
Notes:
  • 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).
  • Versions 20 and later
    This function is available in 64-bit mode.
    New in version 20
    This function is available in 64-bit mode.
    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 being charged,
  • 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 powered through AC power,
  • 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 Mobile Device,
  • False to get information about the secondary battery of 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 whether an error was generated by this function, use ErrorInfo associated with the errMessage constant.

Various

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