javascript - Windows Phone 8.1 Battery Info -
hi need functionality windows phone 8.1 winrt app (javascript). 1. api detect when device under charging 2. api detect battery percentage under limit.
there no actual way see if battery charging can use following code:
debug.writelineif(battery.getdefault().remainingdischargetime > timespan.fromdays(5),"battery charging");
in order check battery level need following:
debug.writeline(battery.getdefault().remainingchargepercent.tostring() + "% battery remiaining");
Comments
Post a Comment