Partager via


DeviceEmulator and virtual battery

I'm looking at implementing a virtual battery in the next DeviceEmulator release.  How much control do you need over the virtual battery?

The straightforward way to emulate a battery is to have two controls:

  1. Is the emulated device on battery or A/C power?
  2. What is the battery charge as a percentage?

With those, you can simulate the transition from battery to A/C and back, and set the battery charge to values that trigger the low-battery and critical-battery events.  Is there a need for more?  The battery APIs return a SYSTEM_POWER_STATUS_EX2 structure which contains data about battery temperature, which kind of battery (NiCAD, Lithium-ion, etc.), number of seconds of runtime predicted.  They also can return status about both a primary and backup battery. 

Is that important to anyone?

Comments

  • Anonymous
    February 06, 2006
    Battery emulation would be great. It would be useful in testing applications. How do you plan to make the functionality of the battery level actually changing? As in, would we see a GUI to do that?
  • Anonymous
    February 15, 2006
    The comment has been removed
  • Anonymous
    March 26, 2006
    I think that is a great idea. You should talk to the SMS provider to make a system to test SMS messaging. I was thinking something like a menu on the emulator.