I would like to categorize the data usage by:
OS ------60% (300MB used so far)
Music ------ 10% (50MB used so far)
Facebook -----5% (25MB used so far)
Use http://developer.android.com/reference/android/net/TrafficStats.html#getUidRxBytes(int)
public static long getUidRxBytes (int uid)
Added in API level 8 Return number of bytes received by the given UID since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage.
Before JELLY_BEAN_MR2, this may return UNSUPPORTED on devices where statistics aren't available.
See Also myUid() uid
and
public static long getUidTxBytes (int uid)
Added in API level 8 Return number of bytes transmitted by the given UID since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage.
Before JELLY_BEAN_MR2, this may return UNSUPPORTED on devices where statistics aren't available.
See Also myUid() uid