how to get the cache size of installed applications in android
<p>I'm using the following code to get a list of all installed apps on android, my question is how is it possible to get the size of the cache that's used by those applications,
any help would be appreciated.</p>

<pre><code>public class CacheActivity extends Activity {

    private ListView lv;
    // private TextView tv;
    private List&lt;PackageInfo&gt; pkNames;

    // private Context context;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.cache);

        lv = (ListView) findViewById(R.id.cacheList);
        // tv = (TextView) findViewById(R.id.text1);
        pkNames = getPackageManager().getInstalledPackages(0);

        ArrayAdapter&lt;PackageInfo&gt; adapter = new ArrayAdapter&lt;PackageInfo&gt;(this,
                android.R.layout.simple_list_item_1, pkNames);
        lv.setAdapter(adapter);

    }
}
</code></pre>
