Reputation: 14808
I am trying to get the application size
and i tried PackageStats
mPackageStats = new PackageStats(package_name);
app_apk_size = mPackageStats.codeSize;
app_cache_size = mPackageStats.cacheSize;
app_data_size = mPackageStats.dataSize;
But getting 0
What's wrong with the code or any other method?
Thanks!!!
Upvotes: 1
Views: 1138
Reputation: 67286
Unfortunately there is currently no public api to retrieve size information about application packages. But you can check this blog
how we can get the size of the Application using reflection.
Upvotes: 3