FORUMS

Accessing hidden methods of TrafficStats

12,231 posts
Thanks Meter: 34,496
 
Post Reply Email Thread
I need some help accessing the hidden API.
Well i have to access the getRxBytes(String iface) method of TrafficStats.
I want to make a wrapper to pass a name of the interface and get the RX and TX bytes of it.

Current public are
TrafficStats.getMobileRxBytes();
TrafficStats.getMobileTxBytes();

and

TrafficStats.getTotalRxBytes(); TrafficStats.getTotalTxBytes();

I need
TrafficStats.getRxBytes(String iface);
TrafficStats.getTxBytes(String iface);

i need a wrapper like

public long getInterfaceTxBytes(String interface) {
// hidden API getter
TrafficStats.getTxBytes(interface);
}
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes