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)
This challenge is not just bauble but also has practical relevance.
10 Likes
Btw, in AI2 you only need this:
3 Likes
As I feared / expected, there are no solutions from the forum.
It’s really tricky to deal with that, and should be reason enough for the Kodular team to take care of it.
Here is one of my (workaround) solutions:
Challenge_46_solution.apk (5.1 MB)
3 Likes
Peter
(Moderator)
November 8, 2019, 2:40pm
#4
That’s indeed rather complex to get all permissions. Thanks for sharing. I think a lot of users can use this.
2 Likes
Thanks Peter, this is the AIA. Maybe someone can simplify this a bit more.
permissions.aia (37.8 KB)
1 Like
Taifun
November 8, 2019, 7:06pm
#6
here is my contribution to the challenge
this works for any number of required permissions, just add them in the list…
Taifun
permissionsTaifun.aia (4.1 KB)
11 Likes
Great! Yes, that’s more elegant & flexible than my solution. Thanks Taifun.
But hopefully it won’t be a permanent way to grant permissions …
1 Like
A final remark :
Since I’m on the road with AI2, Thunkable,… and finally Kodular, I’ve been struggling with 2 problems (starting with runtime permissions at API 23):
permissions
looping audio seamlessly (Player Component and now since Eagle also ExoPlayer)
Once these problems are solved, I’ll breathe a sigh of relief or as we say in Germany “I will make three crosses”.
EDIT :
Here is the new (simple) solution to this Challenge:
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:
This is now my solution (to grant 3 or more permission at Screen.Initialize):
per…
1 Like
system
(system)
Closed
December 9, 2019, 12:48am
#9
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.