Pregunta

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?

¿Fue útil?

Solución

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.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top