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.
public class CacheActivity extends Activity {
private ListView lv;
// private TextView tv;
private List<PackageInfo> 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<PackageInfo> adapter = new ArrayAdapter<PackageInfo>(this,
android.R.layout.simple_list_item_1, pkNames);
lv.setAdapter(adapter);
}
}