locked
How can I get the Battery information in metro style app? RRS feed

  • Question

  • Hi,

    How can I get the Battery information in metro style app, please?

    I need to show the battery information on metro style app because it’s a medical app and it’s very dangerous if users don’t see the battery is low.

    I’m using CaptureElement which is only supported on windows store app so I can’t make the desktop app instead of metro style app.

    Thanks.

    Wednesday, December 4, 2013 1:50 AM

Answers

  • Hi Mona7170,

    Sorry, there is no such API for you to get battery information in Windows Store App, GetSystemPowerStatus is only available while developing for desktop application.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Mona7170 Wednesday, December 4, 2013 7:30 AM
    Wednesday, December 4, 2013 2:34 AM
    Moderator

All replies

  • Hi Mona7170,

    Sorry, there is no such API for you to get battery information in Windows Store App, GetSystemPowerStatus is only available while developing for desktop application.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Mona7170 Wednesday, December 4, 2013 7:30 AM
    Wednesday, December 4, 2013 2:34 AM
    Moderator
  • Thanks for your answer, however it's not cool that there is no API for it. 
    Wednesday, December 4, 2013 7:33 AM