W3C home > Mailing lists > Public > public-device-status@w3.org > October 2011

Re: Feedback about Battery Status Events

From: Mounir Lamouri <mounir@lamouri.fr>
Date: Mon, 24 Oct 2011 09:41:26 +0100
Message-ID: <4EA524B6.2090705@lamouri.fr>
To: public-device-status@w3.org
CC: ext Kihong Kwon <kihong.kwon@samsung.com>, Jonas Sicking <jonas@sicking.cc>
On 10/24/2011 08:21 AM, Jonas Sicking wrote:
> On Mon, Oct 24, 2011 at 12:18 AM, Anssi Kostiainen
>> The latest spec says:
>>
>> [[
>>
>> The [remaining] attribute must be set to the value positive Infinity, if the implementation is unable to report the time remaining, or there is no battery attached to the system."
>>
>> ]]
>
> It should also return Infinity if the device is plugged in and
> actually charging (i.e. power usage is lower than power supplied),
> right?

I think 'remaining' should be used to show the remaining time before the 
battery is full when the battery is charging. This is an information UI 
are going to need.

Also, I would like to point that remaining === Infinity will be a way to 
check if the device actually has a battery or not. In some way, I think 
consumers of this API might required this information but I'm not sure 
this is done on purpose. I would have preferred to have a more explicit 
way to show this information. I think it would be better to default to 0 
instead of Infinity. Given that with no battery, the state will always 
be charging, remaining=0 would mean fully charge which makes sense I 
believe.

--
Mounir
Received on Monday, 24 October 2011 08:41:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 24 October 2011 08:41:55 GMT