locked
Battery charging event through IBackground task

    Question

  • Hi,

    I am trying to create a window run-time component which will execute a part of my code as soon as device is connected to charger/USB or disconnected to charger/USB.

    I am trying to run it in IBackground task.

    Please help me !!

    Thanks in advance.

    Monday, April 20, 2015 9:27 AM

Answers

  • Hello,

    AFAIK we do not have a background task trigger specific for connecting / disconnecting from a charger. The closest thing we have is the MaintenanceTrigger. This is a timed trigger that will only fire if the device is connected to the charger.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Tuesday, April 21, 2015 12:46 AM
    Moderator