Frage

I would like to measure the traffic rate in Android with android.net.TrafficStats. The documentation says, there is a getUidTcpTxBytes() and a getUidUdpTxBytes() function in this class. These ware added in API level 8. I'm using API level 8, but I can not find these functions, only some of them like getTotalRxBytes().

What could be the problem?

War es hilfreich?

Lösung

getUidTcpTxBytes() was added in API Level 12, as was getUidUdpTxBytes(). You can tell this by viewing the methods in the JavaDocs and seeing the "Added in API level 12" notation, on the right side of the gray bar that houses the method signature.

Andere Tipps

Look closer: getUidTcpTxBytes() was added in API Level 12, as well as getUidUdpTxBytes(). Actually most of them were added after API Level 12 and 14.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top