Yes, as I said.
So @Taifun should remove READ & WRITE permissions request or you have to remove it from the Manifest.
Maybe WRITE permission is needed for the Pro version (to build the icon).
Taifun can clarify.
how to deal with permission with blocks . ?
@bodymindpower @dora_paz are you sure it’s not needed, how else should it be able to create folder and add images to it…
/storage/emulated/0/Pictures/.Packages/
"icon":"\/storage\/emulated\/0\/Pictures\/.Packages\/com.google.android.youtube.png"}, {"package name":"com.google.android.googlequicksearchbox", "app name":"Google","version name":"7.8.22.21.arm64", "version code":300745809, "icon":"\/storage\/emulated\/0\/Pictures\/.Packages\/com.google.android.googlequicksearchbox.png"}, {"package name":"org.telegram.messenger",
see the documentation for property DefaultDirectory here App Inventor Extensions: Package Manager | Pura Vida Apps
Set the default directory. Default value is /Pictures/.Packages .
In the GotPackages event the icons of all the installed apps will be stored in that directory.
Note: starting the directory with a dot hides the directory from the Gallery app.
Taifun
Does my APK work (without permissions)?
Yes, I also checked that:
- Galaxy Note8 (Android 9) and
- Pixel 2XL (Android 11 - Beta)
Yeah but without icons…
So for icons it need Permission ?
As I said / assumed:
As I’ve said often enough, I hate permissions (just like my users) and try to avoid them whenever possible.
Therefore, the non-pro version should not request permissions. I had removed both permissions (READ / WRITE) from the Manifest and used an empty .PermissionDenied block
.
No, for both…
No, for both
But it shouldn’t …
In this image, you were supposed to see the icon.
So it needs permission for showing the apps icon.
So it needs permission for showing the apps icon
see the documentation for property DefaultDirectory here App Inventor Extensions: Package Manager | Pura Vida Apps Set the default directory. Default value is /Pictures/.Packages . In the GotPackages event the icons of all the installed apps will be stored in that directory. Note: starting the directory with a dot hides the directory from the Gallery app. Taifun
No, for both
No.
In this image, you were supposed to see the icon
No, only with the Pro version.
To finally clarify that:
- I used the original aia from Taifun and used it to create the APK.
- If you install this APK on a device with API > 22, the folder
/Pictures/Packages
is NOT created, regardless of whether you grant or deny permission. - When you install the APK on a device with API < 23, the folder is created (because permissions are granted at install-time) and even the icons are displayed.
Conclusion:
- The app does NOT automatically request WRITE permission, only READ.
- The APK (non-pro version) will work regardless of this. if you deny permission or, as I have shown with my packagemanager2.apk, if the permissions have been removed from the manifest.
- The default folder
/Pictures/Packages
is only created if WRITE permission is requested manually and then granted. - And again: This folder is not required for the non-pro version to work.