Android, get app size

前端 未结 1 1632
时光取名叫无心
时光取名叫无心 2021-01-20 22:28

I\'m looking for a way to calculate the size of an installed Android application/package. I can\'t find this information in neither ApplicationInfo nor PackageInfo objects.

相关标签:
1条回答
  • 2021-01-20 22:39

    If you look at ManageApplications.java, you'll see that they use the hidden getPackageSizeInfo method of the PackageManager. This isn't part of the public API, so you shouldn't really use it.

    Here's an example of how you shouldn't use it!

    0 讨论(0)
提交回复
热议问题