recived = TrafficStats.getUidRxBytes(uid);
send = TrafficStats.getUidTxBytes(uid);
TrafficStats.getMobileRxBytes();
TrafficStats.getMobileTxBytes();
TrafficStats.get
I think you should use alternative way, get traffic by UID, for example — getUidRxPackets(int uid)
Also helpful (how get UID): (How to get all apps installed on android phone)
EDIT:
can you tell me how i can determine how much data use by wifi and mobile.??
There a nice answer — android statistic 3g traffic for each APP, how? look his logic.