The Battery widget allows you to test how your application reacts with different battery charge levels and states of charge.

Battery widget window

To use the Battery widget:

  1. Click Battery widget button.
  2. Activate the battery simulation mode by clicking On.
  3. Modify the charge level using the slider or enter a value in the Charge level field.
  4. Modify the state of charge by the State of charge :
    • to activate the Charging state.
      This simulates that the power supply is plugged in and the battery is charging.
    • to activate the Discharging state.
      This simulates that the power supply is unplugged and the battery is discharging.

By default, the virtual device emulates the same battery charge level as the one of your computer. If your computer does not have a battery (desktop computer), the simulation mode is automatically activated.