- From: Tim Volodine <timvolodine@google.com>
- Date: Thu, 1 May 2014 15:10:33 +0100
- To: Mounir Lamouri <mounir@lamouri.fr>
- Cc: Marcos Caceres <w3c@marcosc.com>, public-device-apis@w3.org
Received on Thursday, 1 May 2014 14:11:13 UTC
On Thu, May 1, 2014 at 9:53 AM, Mounir Lamouri <mounir@lamouri.fr> wrote: > On Thu, 1 May 2014, at 7:07, Marcos Caceres wrote: > > Maybe getBattery() could resolve to an array... might avoid issues down > > the road if any device ships with multiple batteries. > > If a device has two batteries, I do not think it should be exposed as > such by the API. If you have two batteries, it is simpler for the > developer to see this as one battery. Otherwise, the developers would > have to do a lot of work to guess how much battery power is left > depending on the internals of the system (is the system using both > batteries at the same time, one after each other, etc.). > > Though, if it happens that developers would like more details, > navigator.getBatteries() could return a detailed version while > navigator.getBattery() would return merged data. WDYT? > I agree. The main purpose of the API tends to be: provide information about available energy in general. If need be later we could add getBatteries() to the spec, otherwise I think getBattery() should provide aggregated energy where necessary. Tim
Received on Thursday, 1 May 2014 14:11:13 UTC