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

Re: 答复: comments of Network Information API

From: Mounir Lamouri <mounir@lamouri.fr>
Date: Wed, 21 Mar 2012 14:39:57 +0100
Message-ID: <4F69DA2D.8060803@lamouri.fr>
To: public-device-apis@w3.org
On 03/21/2012 04:49 AM, 吴静 wrote:
> For example, I'm watching internet video using WiFi, but it disconnects for some reason, and the mobile reconnects internet through 3G access point, which is usually charging according to the data flow. If we failed to tell the user this change as soon as possible, the user will have a big problem when he receives his bill at the end of the month. If we have the parameter '.type', we can give users an explicit information in application when the network is switching and reconnecting.

The metered attribute should be used for the scenario you are
mentioning: when you switch to a 3G connection, an event should be fired
to let you know that the connection is now metered.
In my opinion, this solution is far better than using a type attribute
because you can imagine that .metered will return false if the user has
an unlimited 3G data plan [1] while only checking connection type will
returns false positives and false negatives.

[1] Right now, implementations will hardly be able to do better than |if
(dataConnection) return true;| but if applications are using that
attribute and implementations get better tools to check for metered
status, we could improve things and everybody will get those
improvements while using type to check that is wrong and will stay wrong

Received on Wednesday, 21 March 2012 13:40:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:35 UTC