I found the solution / cause to (many) permission issues. It is caused by the Package Utilities component. Whenever this component is used, the screen must be reloaded to grant permission. And this is the case regardless of whether any method of this component is used or not.
Therefore, I strongly recommend not using this component at all until this bug has been fixed. See this example regarding Challenge 46:
Here is my first contribution to the “Daily Challenge”. It seems to be easy …
How to grant 2 or more permissions on Screen.Initialize, only by granting the permissions.
Permissions:
android.permission.READ_EXTERNAL_STORAGE
android.permission.WRITE_EXTERNAL_STORAGE
and android.permission.RECORD_AUDIO
For example, drag the File and Sound_Recorder component in the project and try …
Result: something like that: permissions_x264.mp4 (487.1 KB)
permissions_Challenge.aia (32.9 KB)
[grafik]
Th…
This is now my solution (to grant 3 or more permission at Screen.Initialize):
permissions_Challenge46_new.aia (33.8 KB)
permissions_Challenge46_new.apk (5.0 MB)
Btw, READ permission is also granted; so 4 permissions are granted.
See also here :
In addition I should point out this issue (bug) in my guide “How to ask for permission in the right way”:
If a (dangerous) permission has to be requested, the following block should no longer be used, for example:
[grafik]
The block works, but it is not supported in this block:
[grafik]
So just use always this block by default:
[grafik]
Only then you get the correct Boolean (true / false):
[grafik]
12 Likes
Thanks for sharing these kind information
1 Like
Here is the same app after adding the Package Utilities component (but without using it).
If you check this, you will find that you will need to reload the screen to get / grant permissions.
permissions_Challenge46_new2.apk (5.0 MB)
Note: You have to uninstall the previous version beforehand or delete the app data.
2 Likes
This post / solution is also affected by this issue (bug) caused by the Package Utilities component:
It’s really hard to get it working, because there are several issues with the File component:
Sometimes the full path and sometimes the relative is used (see blocks below)
WRITE permission is not queried automatically (only READ), so you have to ask manually for WRITE permission.
Permission granted is not triggered when the app starts for the first time, so you have to reload the screen.
Moreover: the File component can not access the assets with the APK (works only with companion).
To chec…
2 Likes
Taifun
Split this topic
May 10, 2021, 6:06pm
#5