Lucas Eduardo Active Member Licensed User Feb 26, 2019 #1 How can i get the size of each app installed? with this code i can list all packages names B4X: Dim pm As PackageManager Dim packages As List packages = pm.GetInstalledPackages For i = 0 To packages.Size - 1 Log(packages.Get(i)) Next
How can i get the size of each app installed? with this code i can list all packages names B4X: Dim pm As PackageManager Dim packages As List packages = pm.GetInstalledPackages For i = 0 To packages.Size - 1 Log(packages.Get(i)) Next
Erel B4X founder Staff member Licensed User Longtime User Feb 27, 2019 #2 It is possible to get this information on Android 8+ with a special permission that the user needs to enable in the settings page. Not so simple but possible. If relevant I will write an example. Upvote 0
It is possible to get this information on Android 8+ with a special permission that the user needs to enable in the settings page. Not so simple but possible. If relevant I will write an example.
Lucas Eduardo Active Member Licensed User Feb 27, 2019 #3 I will appreciate if you write an example. Thank you. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 27, 2019 #4 Example of using StorageStatsManager and StorageManager to list all apps sizes is attached. Note that minSdkVersion is set to 26 (Android 8). Attachments StorageStats.zip 8.6 KB · Views: 370 Upvote 0
Example of using StorageStatsManager and StorageManager to list all apps sizes is attached. Note that minSdkVersion is set to 26 (Android 8).
Lucas Eduardo Active Member Licensed User Feb 27, 2019 #5 Is there no way to do this in Android older than Android 8? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 28, 2019 #6 See my answer in post number #2. Upvote 0
DonManfred Expert Licensed User Longtime User Feb 28, 2019 #7 Lucas Eduardo said: Is there no way to do this in Android older than Android 8? Click to expand... The StorageStatsManager is added in Api 26. https://developer.android.com/reference/android/app/usage/StorageStatsManager Upvote 0
Lucas Eduardo said: Is there no way to do this in Android older than Android 8? Click to expand... The StorageStatsManager is added in Api 26. https://developer.android.com/reference/android/app/usage/StorageStatsManager
Lucas Eduardo Active Member Licensed User Feb 28, 2019 #8 Yes, i saw that, but in other applications they do the same thing with older versions, so there is a way. Upvote 0
Yes, i saw that, but in other applications they do the same thing with older versions, so there is a way.