Search code examples
c#windows-phone-7windows-phone-7.1

subscribe to charger connected event in wp7


is there a way to subscribe to the event, when charger is connected?

i am developing an application which need to be notified if when the phone charger is connected and when it is disconnected.


Solution

  • There is no way to know when a device enters or leaves a charging state with the currently available APIs.

    In fact, there are no APIs relating to power or battery level currently available so there's no work around by polling, etc.