Screen.AskForPermission block calls 908 when user denies the permission when the app is firstly/secondly run

I checked out Kodular Fenix (v1.5.0) Bug Tracker before creating a new topic


Describe your issue

When you call the Screen1. AskForPermission block when the user first runs the app, and the user denies the error through the permission dialog, there are two scenarios for what will happen next. Both are bugs.

  • When you build the app: the next time you call the same error, the 908 error appears (again). Tested with the coarse location permission.

  • When you connect with companion: the permissions dialog doesn’t even appear; the 908 error immediately occurs the first time when the user opened the app and clicked the button.

image


Steps to reproduce the issue

Open a new project, add the blocks in the Show your blocks section. Build or test with the companion.


Expected Behaviour

  • For Scenario 1 (built app): the PermissionDenied event should be invoked instead of the 908 error.

  • For Scenario 2 (companion): a permission dialog should appear.

Working perfectly with App Inventor.


Actual Behaviour

Described (the 2 scenarios) in the first section.


Show your Blocks

image


Android version

8.1, 11, 13


@Diego @pavi2410 Sorry to tag you, but can you look into this please? It’s an urgent bug (because requesting permissions are extremely necessary to do a lot of things). Thanks!