Closed
Bug 796539
Opened 12 years ago
Closed 11 years ago
navigator.mozConnection does not provide the correct network information
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-kilimanjaro:+, blocking-basecamp:-, feature-b2g:-, tracking-b2g:backlog)
People
(Reporter: ghtobz, Unassigned)
References
()
Details
(Keywords: feature)
[GitHub issue by crdlc on 2012-08-27T14:12:29Z, https://github.com/mozilla-b2g/gaia/issues/3850]
Hi all,
I was testing the mozConnection API in the homescreen and the bandwidth is always Infinity (with or within WIFI). Anyone with this problem?
Thanks
var connection = window.navigator.connection ||
window.navigator.mozConnection ||
window.navigator.webkitConnection;
onConnectionChange();
connection.addEventListener('change', onConnectionChange);
function onConnectionChange() {
console.log('Connection bandwidth: ' + connection.bandwidth);
}
Comment 1•12 years ago
|
||
We need to fix this, otherwise apps would need to get access to network specific APIs in order to know whether they are on Wifi or in 3G
blocking-basecamp: --- → ?
blocking-kilimanjaro: --- → ?
Component: Gaia → General
OS: All → Gonk
Hardware: All → Other
Target Milestone: --- → DeveloperPhone
Updated•12 years ago
|
Summary: Problem mozConnection in homescreen → navigator.mozConnection does not provide the correct network information
Whiteboard: [label:homescreen]
Updated•12 years ago
|
Comment 2•12 years ago
|
||
Given that would be adding a feature, I'm afraid it might be too late to fix for v1.
Keywords: feature
Comment 3•12 years ago
|
||
a feature would be added if navigator.mozConnection would not exist. But as it actually exists and is not working properly that is not a feature, but a bug to be fixed
Given that we are past feature freeze, I think we need to minus this one. It's also not something that we expect a huge number of apps to require.
blocking-basecamp: ? → -
blocking-kilimanjaro: ? → +
Comment 5•11 years ago
|
||
Nominate since It's necessary for App that seriously concerning data bandwidth and have different policy in different connection condition (ex: Dropbox & google+ only auto upload image if in wifi connection)
blocking-b2g: --- → 1.4?
Comment 7•11 years ago
|
||
(In reply to Preeti Raghunath(:Preeti) from comment #6)
> Ken
>
> Would this work be in scope for 1.4?
This kind of information are not going to be provided by navigator.mozConnection.
It should be provided by Network Information API and seems be discussing now.
ni?Marcos
Flags: needinfo?(kchang) → needinfo?(mcaceres)
Comment 8•11 years ago
|
||
Seems reasonable to go with Network Information API. https://developer.mozilla.org/en-US/docs/WebAPI/Network_Information
Any related bug number?
(In reply to Fred Lin [:gasolin] from comment #8)
> Seems reasonable to go with Network Information API.
> https://developer.mozilla.org/en-US/docs/WebAPI/Network_Information
>
> Any related bug number?
Hi Fred,
please check Bug 960426.
there is an new API proposal (i.e., Network Information API v3), which is aiming at supporting some use cases (as you mentioned above).
Here are some quick links:
[1] https://github.com/ferjm/w3c-netinfo-v3-proposal
[2] https://github.com/w3c-webmob/netinfo
The spec at https://developer.mozilla.org/en-US/docs/WebAPI/Network_Information is likely going to change a bunch in response to feedback from other browser vendors as well as web-developers.
See bug 960426 comment 9
This bug is likely also a dupe of that one (or the other way around).
Comment 11•11 years ago
|
||
message app need know the bandwidth to provide adaptive thumbnail or tune the voice quality.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(mcaceres)
Resolution: --- → DUPLICATE
Comment 12•11 years ago
|
||
At [1] you can find a brief explanation about why we consider that this API should not expose a 'bandwidth' property. This includes alternative approaches to solve the use cases that you mentioned above. Please, let us know if [1] makes sense for you.
[1] https://github.com/w3c-webmob/netinfo#why-not-exposing-a-bandwidth-property
Comment 13•11 years ago
|
||
Fernando, it make sense.
Basically developer just need to know what's billing the user and try to avoid making huge data usage to make user unhappy.
I know Android allow developer design a dialog to let user select if they want send data only in wifi mode (or while network is in cellular type). So it works.
Updated•11 years ago
|
blocking-b2g: 1.4? → ---
Comment 14•11 years ago
|
||
I'm really unhappy!
The MozConnection always returns the same (wrong) network information, regardless of whether the device is connected with WIFI or uses CELLULAR data.
For my opinion, Mozilla acts totally paranoid by disabling this feature. Otherwise, I'll need to change my app to "certified" to use the Network Information API (read only!!).
As Fred Lin mentioned:
"Basically developer just need to know what's billing the user and try to avoid making huge data usage to make user unhappy."
This is a major bug in my opinion. The Firefox OS Marketplace is a universe for low-quality apps right now. Serious developers will not touch FFOS until this bug is fixed.
Comment 15•11 years ago
|
||
(In reply to cept0 from comment #14)
> I'm really unhappy!
>
> The MozConnection always returns the same (wrong) network information,
> regardless of whether the device is connected with WIFI or uses CELLULAR
> data.
>
> For my opinion, Mozilla acts totally paranoid by disabling this feature.
> Otherwise, I'll need to change my app to "certified" to use the Network
> Information API (read only!!).
>
> As Fred Lin mentioned:
>
> "Basically developer just need to know what's billing the user and try to
> avoid making huge data usage to make user unhappy."
>
> This is a major bug in my opinion. The Firefox OS Marketplace is a universe
> for low-quality apps right now. Serious developers will not touch FFOS until
> this bug is fixed.
Hi,
Network Information API has been updated based on a new proposal [1][2], it could have solved your problem (which don't need privileged permission). However, I think it's not available on 1.4 yet, but you can check it with mozilla-central.
For your concern, I think we can surely consider about whether we need to land it on 1.4 if there are requirements.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=960426
[2] http://w3c.github.io/netinfo/
Comment 16•11 years ago
|
||
Moving this to backlog. Concerned about lateness for release 1.4
blocking-b2g: 1.4? → backlog
Assignee | ||
Updated•10 years ago
|
blocking-b2g: backlog → ---
tracking-b2g:
--- → backlog
You need to log in
before you can comment on or make changes to this bug.
Description
•