- From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
- Date: Wed, 24 Aug 2011 12:41:41 +0300
- To: "public-device-apis@w3.org WG" <public-device-apis@w3.org>
Hi, On 23.8.2011, at 14.06, ext Anssi Kostiainen wrote: > I thought about this a bit more and came up with the following design: > > http://dev.w3.org/2009/dap/system-info/battery-status.html > > Changes: > > http://dev.w3.org/cvsweb/2009/dap/system-info/battery-status.html.diff?r1=1.34;r2=1.35;f=h > > * Added the status attribute to the BatteryStatusEvent interface as proposed by Francois. > > * Added a new event type batteryok. The values of the status attribute (low, critical, ok) now have corresponding battery{low|critical|ok} event types. And also: * Added prose on event order: http://dev.w3.org/cvsweb/2009/dap/system-info/battery-status.html.diff?r1=1.35;r2=1.36;f=h > With these changes, developers are able to: > > i) listen to the batterystatus events to get isPlugged, level and status if they're not worried about getting too many events, or > > ii) listen to the battery{low|critical|ok} events if they are concerned of performance and wish to only get the minimal number of events. > > I believe this addresses all the high-value use cases we've discussed so far, while not adding much in terms of complexity. Let me know what you think. -Anssi
Received on Wednesday, 24 August 2011 10:50:10 UTC