|
|
|
|
- Battery
- Managing errors
- Various
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.
// 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.
| ceChargeLevel | Charge level of battery:- 0: battery not found.
- 1: high level.
- 2: low level.
- 3: critical level.
| ceChargePercentage | Percentage of battery load. | ceACLineStatus | - True if the Mobile Device is plugged in,
- False otherwise.
| ceRemainingLife | Remaining lifetime (in seconds) of battery. | ceTotalLife | Total 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|