facebookarchive / network-connection-class

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

Google Pixel Android 9 Issue - Current average bandwidth is -1.0 Kilobits/s and Quality UNKNOWN #43

Open BrunoTrovoN26 opened 5 years ago

BrunoTrovoN26 commented 5 years ago

Hello,

I'm having issues when trying to measure the connection on devices Google Pixel Android 9. The result is always Current average bandwidth is -1.0 Kilobits/s and Quality Unknown. This is happening only on Google Pixel Android 9 Devices, do you have any advice for this scenario?

Thanks.

BrunoTrovoN26 commented 5 years ago

The problem is related to the Android 9 version, more specifically this file /proc/net/xt_qtaguid/stats that is phased out in the Android 9 Version, as stated here:

https://source.android.com/devices/tech/datausage/kernel-overview

Note: Support for xt_qtaguid will be phased out starting in the Android 9 release. See eBPF Traffic Monitoring for more information.

LxzBUG commented 5 years ago

@BrunoTrovoN26 How to solve ? T T

vibin commented 4 years ago

Issue related to /proc file is fixed in origin/master. Fork the repo and build yourselves!

https://github.com/facebook/network-connection-class/commit/b4871d94e703f4cd020338d3795ae48205179e90