W3C home > Mailing lists > Public > public-device-apis@w3.org > March 2011

Re: Battery Status Event Spec

From: Robin Berjon <robin@berjon.com>
Date: Thu, 31 Mar 2011 15:41:13 +0200
Cc: Anssi Kostiainen <anssi.kostiainen@nokia.com>, "public-device-apis@w3.org Group WG" <public-device-apis@w3.org>
Message-Id: <08883D23-9639-4184-9CBA-DB9B640A7228@berjon.com>
To: "Tran, Dzung D" <dzung.d.tran@intel.com>
On Mar 31, 2011, at 00:02 , Tran, Dzung D wrote:
> One concern is that I don't particular think that firing events on regular intervals make sense for Battery status. It makes sense for DeviceOrientation, since the use case is different in a sense that you want to update the map on regular interval. As for battery, you might just want to get an event when you are at a certain threshold such as 20% of battery left, unless you have a web app that display the battery meter, but how useful is a battery meter app.

I certainly don't expect the implementation to be dispatching events all the time, as it would with orientation. But events are a useful model nevertheless. They integrate well into the stack. For isCharging/isBattery they're pretty much what you want in any case. And I can see use cases other than battery meters. For instance, you could listen to timeRemaining to see if there's still enough time to finish the video currently being watched.

> Also I don't particular like the use of timeRemaining. Maybe it should be percentage charged?

Isn't that what level is for?

-- 
Robin Berjon - http://berjon.com/
Received on Thursday, 31 March 2011 13:41:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:18 GMT