facebookarchive / network-connection-class

Listen to current network traffic in the app and categorize the quality of the network.
Other
3.18k stars 515 forks source link

Feature Request: Ability to Specify Custom Intervals for Connection Quality Classes #23

Open sreejithr opened 8 years ago

sreejithr commented 8 years ago

In our app, user bandwidth would never cross 150kbps since most of our users are in 2g and rarely in 3g. Consequently, the connection class is always in POOR.

zlern2k commented 8 years ago

Changing the thresholds doesn't affect the averaging math. Keep in mind that the averages are very noisy, so your thresholds should be at least a factor of ~3.5 apart; for instance 30, 100, 350. You should go ahead and change them to whatever makes sense for your app.

sreejithr commented 8 years ago

@zlern2k But since the connection class speeds are hard-coded into constants, I can't change them without taking a fork. Shouldn't this be easier?

manuelkch commented 7 years ago

Any intention yet to remove them from the hard-coded part and make it configurable in the future? I'd like to make that configurable for a react-native bridge. Or should we continue with a fork?