Automatic asking for dangerous permissions does not work (anymore) in MRTK3-based app

Even though I have set this

and this

the dialog for requesting permissions does not appear. I have to write explicit code to make it happen.

            MLPermission.SpatialMapping} ,
            OnPermissionGranted, OnPermissionDenied, 

This was not the case earlier.

  • Unity 2022.2.32f1
  • OS 1.7.0
  • Development on Windows.
  • Using OpenXR
  • SDK 2.2.0
  • com.magicleap.mrtk3: 1.0.0
  • Latest MRKT3

Hey @localjoost,

As a sanity check, I just built the OpenXR branch (mrtk3_MagicLeap2_OpenXR) of our public fork of the MRTK dev project, here. The permission dialogs do come up for me when running the application on a fresh install, and the selected permissions are auto requested and work as expected (no manual code needed).

One thing I've noticed, though, is that if you use any other manual Permissions.RequestPermission(...) calls in project code, it can interfere now with the automatic calls the package makes due to timing and having more than one request out at a time before user feedback. This used to not be the case, but with SDK 2.1.0, we switched to using Android permission APIs, and it seems you can only make one request at a time and wait for the response before calling another, or pass in an array of all permissions once. Perhaps this is the issue you are seeing (other manual code making requests interfering with the automatic requests)?

I think this can be closed, see Issues using 2.2.0 on 1.7.0, with MRTK3 and OpenXR - #28 by localjoost