From Xojo Documentation
The amount of battery remaining.
A value of 0.0 means the battery is full discharged. A value of 1.0 means the battery is fully charged.
This example enables monitoring of the battery, gets the current battery level, disables battery monitoring and then displays the level in a message box:
Var batteryPercentage As Integer = System.Device.BatteryLevel * 100
System.Device.BatteryMonitoringEnabled = False
MessageBox("Your battery is at " + batteryLevel.ToString + "%")