Android development: How to find out which applications are currently accessing the internet?
<p>Is there any method that can help me track internet usage by application? I need to find out which app is using Internet at the moment.</p>

<p>I've managed to get all applications with INTERNET permission but I don't know how to get only those applications that are connected to internet.</p>

<pre><code>for(int i=0; i&lt;applications.size(); i++){
        ApplicationInfo info = applications.get(i);
        if(PackageManager.PERMISSION_GRANTED==packageManager.checkPermission(Manifest.permission.INTERNET, info.packageName)){
            netApplications.add(info);      
        }


}
</code></pre>
