Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

always showing internet quality POOR #35

Open
sssvrock opened this issue Jul 18, 2017 · 1 comment
Open

always showing internet quality POOR #35

sssvrock opened this issue Jul 18, 2017 · 1 comment

Comments

@sssvrock
Copy link

DeviceBandwidthSampler.getInstance().startSampling();
// Calling API network operation and after success or error from volley response
DeviceBandwidthSampler.getInstance().stopSampling();
mUtils.showInternetQualityIfPoor(); // Now checking bandwidth and showing message

even though when I was in Very god internet quality, it is always showing POOR connection, help me out how can I modify to get exact connection quality

Regards
Vinod

@mousetraps
Copy link

@sssvrock what does your network operation do? According to the README, "The library does this by listening to the existing internet traffic done by your app and notifying you when the user's connection quality changes." So if you're not downloading much data in between starting/stopping the sampling, it's going to always report a poor connection.

You can see the default values here:
https://github.com/facebook/network-connection-class/blob/master/connectionclass/src/main/java/com/facebook/network/connectionclass/ConnectionClassManager.java#L35-L37

If you're trying to do a generic measurement of network quality, you'll have to ramp up your download operations to the max during the sampling period.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants