The Permission Granted event triggers again each time the screen is opened

The “Permission Granted” event triggers again each time the screen is opened, not only for the first time.
This issue is not present on AI2.


permissionLoop.aia (4.4 KB)
loop_x264.mp4 (812.7 KB)

1 Like

it is normal you see permission dialog event screen is opened because you ask permission in screen1.Initialise you should test first with image
if return true run your bloc if return false ask permission needed

1 Like

That was clear to me, but permission granted should actually be triggered only once.

1 Like

You have to use if then else block to trigger permission only once…

1 Like

I did the same with AI2, without any problems. But ok, I have to adapt then probably in Kodular.

2 Likes

permissionLoop (1).aia (4.5 KB)

here i just made a simple change in your aia.
Now you can check it… @bodymindpower

Btw, this would not work, because maybe not all needed permissions are granted at this moment:

1 Like

Ok, thanks!

1 Like

Use the block Is Permission Granted

Use the block Is Permission Granted

which block, where is it? There is no “Is Permission Granted” block.

1 Like

The block is included on the “Package” component

Ok, but that does not work too.
It’s really amazing how many people seem to be dealing with these issues in the right way … do they really?


permissionLoop2.apk (4.9 MB)
1 Like

When asking if permission is granted, what if you wrote the package name instead o using the package utilities block?

What should that make a difference?

Can you tell us Android Version and Device Model

Galaxy Note 8 (Android 9),
same thing on a Xiaomi Redmi Note 5 (Android 9)

These permission issues will certainly occur on all devices with API > 23, so there is no need for me to check this on all my test devices.

Once I had an issue because I use a custom package name and that block was somehow fetching the standard package name instead.

That’s why I thought that could have a relation to it.