I have built an android application, and I want to figure out how much network usage this android application is utilizing. I have explored many android developer forum to get a satisfactory solution but didn't get it. I hope some of the tech experts in this community can help to figure out my issue.
Hello, Did not try . See if this can help Code: ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); List runningApps = manager.getRunningAppProcesses(); for(RunningAppProcessInfo runningApp : runningApps){ // Get UID of the selected process int uid = ((RunningAppProcessInfo)getListAdapter().getItem(position)).uid; // Get traffic data long received = TrafficStats.getUidRxBytes(uid); long send = TrafficStats.getUidTxBytes(uid); Log.v(""+uid ,"Send :"+send +", Received :"+received); } if not share. you can identify your app with package name.