In our application we need to maintain logs for calls,sms and internet. In case of Internet we want to know the data usage of each application on daily, weekly or monthly basis.
We are able to figure out running applications' names through Activity Manager
and RunningAppProcessInfo
and we are able to detect number of bytes sent and received since the device boot using TrafficStats
class but we need help to figure out How can we update these details continuously to provide daily or weekly information.
As the class TrafficStats will update the amount of data received and sent only when the device restarts.