locked
WP 8.1: Get battery level/info in Background Task

Answers

  • I think it's possible by Scheduled Tasks.

    Part 34: Creating a Background Agent for Scheduled Tasks

    Battery class


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

    Friday, November 21, 2014 4:44 AM
  • Hi Plagueczar,

    I think you can use Battery class in windows runtime component, this class is not mentioned in this article. You can try to use the class Bill have posted and feel free to let us know if you have any concerns.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, November 26, 2014 8:57 AM
    Moderator

All replies

  • I think it's possible by Scheduled Tasks.

    Part 34: Creating a Background Agent for Scheduled Tasks

    Battery class


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

    Friday, November 21, 2014 4:44 AM
  • I didn't think WP 8.1 supported Scheduled Tasks. I'm using a Background Task on a TimeTrigger. I need to get the battery level, but I'm not sure if I can in a Windows Runtime Component.
    Friday, November 21, 2014 5:52 AM
  • Hi Plagueczar,

    I think you can use Battery class in windows runtime component, this class is not mentioned in this article. You can try to use the class Bill have posted and feel free to let us know if you have any concerns.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, November 26, 2014 8:57 AM
    Moderator