title: iPhone4 how to find out if the power cable is plugged in?
body: <p>I would like to know if my app is running with an external power cable attached. Is it possible to find out this state at runtime? </p>
  
  <p>An extra question: would this be able to differentiate between true USB power and those external "battery packs"?</p>
  
  <p>Thank you!</p>