Domanda

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?

È stato utile?

Soluzione

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.

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top