- From: jianglin9 <jianglin9@chinaunicom.cn>
- Date: Tue, 20 Mar 2012 17:00:47 +0800
- To: mounir <mounir@lamouri.fr>
- CC: public-device-apis <public-device-apis@w3.org>, anssi.kostiainen <anssi.kostiainen@nokia.com>
- Message-ID: <201203201700466372788@chinaunicom.cn>
Hi Mounir, 1) You only have to wait for two level changes and extrapolate the time it will take before the battery will be charged/empty. This can be improved by taking into account battery characteristics and charging curve. In my options, We can’t assume web developer get ‘chargingTime’ or ‘dischargingTime’ in onlevelchange event handler, maybe use ‘onchargingTime’or ‘ondischargingTime’more popular. 2) In my opinion, it wouldn't be correct if the Battery API was providing a low battery state because the level threshold would be completely arbitrary. Even though we can use ‘level’ and ‘onlevelchange’ properties to judge if the battery is full or low battery, but it’s not logical and not strict. I.e. full charged and low battery status aren’t reported by system but decided by web application developers. The use case of battery ‘state’ : When the laptop’s battery was removed and the charger plugedin. In this situation, the ‘charging’ attribute can’t express the current state of battery. By ‘state’ attribute, user can know the laptop is using external power supply. ‘state’ (or naming ‘criticalstate’) of type DOMString, readonly Represents the current status of the event target. The status may be one of the following: · lowbattery · fullcharged · hightemperature · chargerplugedin · batteryremoved · batteryinserted We don’t have many use case of battery status now, but as you said we could consider it in the future version. Best Regards. 2012-03-20 ******************************************* Derek Jiang China Unicom Research Institute Mobile:18601105110 ; Tel: +8610 66522726 Email: jianglin9@chinaunicom.cn Add: No.33, Erlong Road, Xicheng District, Beijing 100032, P.R.China ********************************************
Received on Tuesday, 20 March 2012 09:01:24 UTC