0

Context:

iPhone is connected to the PC via cable and power indicated 100% ( the icon of the batter contains a small power plug also)

Question:

In this stage the phone is powered directly from USB or is it using the battery ?

Thanks

skaffman
  • 398,947
  • 96
  • 818
  • 769
Iuliu Atudosiei
  • 679
  • 1
  • 8
  • 14

2 Answers2

0

(From developer point of view): there's UIDeviceBatteryState enumeration that contains the battery power state of the device. Among its possible values:

  • UIDeviceBatteryStateUnplugged: The device is not plugged into power; the battery is discharging

  • UIDeviceBatteryStateFull: The device is plugged into power and the battery is 100% charged.

So from these descriptions follows that device does not drain battery if it is plugged into power even if it is 100% charged.

Vladimir
  • 170,431
  • 36
  • 387
  • 313
0

I think the device is always drawing off the battery in order to guarantee a smooth power curve i.e. the battery works like a buffer of sorts. (It also simplifies the hardware.) However, when it is plugged in, the power system continually charges the battery so the net charge on the battery never changes.

I don't think that has any relevance to programming. Usually, you only need to know if a device is plugged in if you're doing something that might take longer than the battery can last. In that case, where the power comes from while plugged in really doesn't matter.

TechZen
  • 64,370
  • 15
  • 118
  • 145
  • 1
    From what I noticed the behaviour is like this: 1. battery is 85 % let's say 2. plug it in the USB 3. battery will have the lightning icon inside battery picture 4. battery reach 100 % and then the power plug icon is displayed 5. after some usage....battery drops to 96% suddenly and starts charging again These means that it is consuming battery i guess...what do you think ? – Iuliu Atudosiei Feb 05 '10 at 13:30