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

RE: Battery Status Event Spec

From: Tran, Dzung D <dzung.d.tran@intel.com>
Date: Thu, 31 Mar 2011 07:24:34 -0700
To: Robin Berjon <robin@berjon.com>
CC: Anssi Kostiainen <anssi.kostiainen@nokia.com>, "public-device-apis@w3.org Group WG" <public-device-apis@w3.org>
Message-ID: <753F67ADE6F5094C9F1DBA00D1BAA8D325EBC2B92C@orsmsx501.amr.corp.intel.com>
> 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.

Yes, but in many of these cases you don't need to fire regular intervals, you just get an event then do something like display a message "Your battery level is 20%, you might want to plug in". I don't see use cases that would need regular intervals.

Thanks
Dzung Tran

-----Original Message-----
From: Robin Berjon [mailto:robin@berjon.com] 
Sent: Thursday, March 31, 2011 6:41 AM
To: Tran, Dzung D
Cc: Anssi Kostiainen; public-device-apis@w3.org Group WG
Subject: Re: Battery Status Event Spec

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 14:25:17 GMT

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