On Android how to count 3G, WiFi internet traffic for daily, weekly, monthly?
<p>I've started recently learning android, and in my current project i need to count daily, weekly, monthly 3G and WiFi internet traffic. By now i could find that:</p>

<p>long totalRecievedBytes = TrafficStats.getTotalRxBytes();<br />
   long totalTransmittedBytes = TrafficStats.getTotalTxBytes();<br />
   String allTraffic = humanReadableByteCount(totalRecievedBytes + totalTransmittedBytes);<br />
   TextView tv = (TextView) findViewById(R.id.traffic_3g_all);<br />
   tv.setText(allTraffic);<br /></p>

<p>i've seen netcounter app and it writes all traffics data to phone's memory. when launched reads traffic data from memory.<br /></p>

<p>what kind of ways exist to collect information about 3G, WiFi internet traffic usage for daily, weekly, monthly?</p>

<p>thanks,
any answers appreciated.</p>
