On 2016-12-15 11:14 AM, Boris Zbarsky wrote:
> On 12/15/16 11:00 AM, Ben Kelly wrote:
>> We are shipping the connection type information on android already. 
>> Since
>> FF32 as far as I can tell.
> 
> That's... not great.  Especially since there was no intent to ship at
> the time.

FWIW Chromium also ships this API on Android and ChromeOS:
<https://chromium.googlesource.com/chromium/src/+blame/e1f453c8038dd60f17847dc37603c64835f9d865/content/child/runtime_features.cc#51>.
 It seems that they ship both the type and typechange events:
<https://chromium.googlesource.com/chromium/src/+blame/e1f453c8038dd60f17847dc37603c64835f9d865/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl>.

FWIW I was one of the people who were involved in the discussions around
this for Firefox OS.  From what I remember, the argument for shipping
this API was that web developers have been asking for this for years,
and they are basically happy to know the distinction between cellular
data and other transports, and infer whether the connection "costs
money".  On Android at least native apps also use the same crude
measure.  I think there was also an argument around the lines of asking
this being so common that a subset of users who actually do have paid
cellular data plans are used to rely on this distinction.

The limitations of this API and how little meaning it is actually
conveying to the developers was generally well understood, but the
counter argument for that would be that it's pretty clear we're never
going to be able to give the app accurate information unless we know
about what servers they want to talk to, and perhaps other load
characteristics, and even then we'd probably need to measure the
bandwidth, which could cost money, defeating the whole purpose; and with
that in mind, it's better to expose something now rather than nothing.

I have to say I personally don't find the last argument reasonable for
downlinkMax, but I can understand it for type.

Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to