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

method "mapBandwidthQuality" doesn't receive any argument in double average #32

Open
kumarjitendra opened this issue Mar 7, 2017 · 0 comments

Comments

@kumarjitendra
Copy link

Hello,
I have to develop an android application to check internet quality like speed, ping , jitter
I am using this library. when i run my application i always get first return . It means double average is not having any values so loop is not executing.
For Example :
case 1. output "Negative"

private ConnectionQuality mapBandwidthQuality(double average) {
if (average < 0) {
return ConnectionQuality.NEGATIVE;
}
if (average < DEFAULT_POOR_BANDWIDTH) {
return ConnectionQuality.POOR;
}
if (average < DEFAULT_MODERATE_BANDWIDTH) {
return ConnectionQuality.MODERATE;
}
if (average < DEFAULT_GOOD_BANDWIDTH) {
return ConnectionQuality.GOOD;
}
return ConnectionQuality.EXCELLENT;
}

case 2. output "GOOD"

private ConnectionQuality mapBandwidthQuality(double average) {
if (average < DEFAULT_GOOD_BANDWIDTH) {
return ConnectionQuality.GOOD;
}
if (average < 0) {
return ConnectionQuality.NEGATIVE;
}
if (average < DEFAULT_POOR_BANDWIDTH) {
return ConnectionQuality.POOR;
}
if (average < DEFAULT_MODERATE_BANDWIDTH) {
return ConnectionQuality.MODERATE;
}

    return ConnectionQuality.EXCELLENT;
}

What is the possible solution please .
optional solution to create app to check internet quality in android is also appreciated
Thanks
Jitendra

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

1 participant