Start a new topic

Camera permissions popup is not displayed when the app is first launched.(Spaces AR SDK 0.23.0 x Dual Render Fusion)

■Environment

* Spaces AR SDK 0.23.0 x Dual Render Fusion.

* I used the following scene.

  Assets/Samples/Snapdragon Spaces/0.23.0/Fusion Samples/Scenes/ControllerPrefabSampleScene

  Assets/Samples/Snapdragon Spaces/0.23.0/Fusion Samples/Scenes/LandscapeUISampleScene

  Assets/Samples/Snapdragon Spaces/0.23.0/Fusion Samples/Scenes/OpenXRLoadingTest

  Assets/Samples/Snapdragon Spaces/0.23.0/Fusion Samples/Scenes/PortraitUISampleScene


■Detail

Camera permissions popup is not displayed when the app is first launched.

Camera Frame Access does not work. ARCameraManager#frameReceived is not called. Unable to get camera image.


■Remarks

SnapdragonSpaces_Unity_Samples_0_23_0.apk is working normally. A camera permissions popup will appear.

 

 

 

 

 

 


I am referring to this article.

https://support.spaces.qualcomm.com/support/discussions/topics/72000788508
Comment by Simon Steiner-san

-------
The Snapdragon Spaces SDK should automatically request camera permissions before starting an app. You do not need to implement that yourself.

-------

I do not hit this issue.

Just curious, do you have a bunch of missing files in  version 0.23.0 of the SDK?

Hi you seem to be running into a bug that we have already tracked internally. We are working on a fix in a future release of Snapdragon Spaces. 

The timing of requesting permissions and starting up the Camera Frame Access feature in OpenXR are important here. The permission needs to be given first, before the OpenXR feature starts up. 


If you want to implement a workaround:

  1. Disable the following components
    1. ARCameraManager
    2. SpacesCameraPoseProvider
    3. SpacesARCameraManagerConfig
  2. Create a script requesting permissions (Camera) at runtime. You may also use the CameraFrameAccessSampleManager. Here are the Unity docs on that  Unity - Scripting API: Android.Permission.RequestUserPermission (unity3d.com)
  3. Register a callback to that permission request.
  4.  In that callback enable the previously disabled components.


Please let us know if that works. 

Hello, Simon-san.


I tried the workaround.

But it didn't work as expected.


I think it might be possible to avoid this by grant camera permission before calling new UnityPlayer() in UnityPlayerActivity.java.

Is this idea correct?

**I haven't tried it yet because it would have a big impact.


I want to know if there is time to wait for the Spaces AR SDK to be fixed.

Can you tell me when the Spaces AR SDK will be fixed?

 

 

 

Hi Shiota, 


We have a fix for this issue confirmed for the next release of Snapdragon Spaces with 0.25.0. The estimated release of this version will be end of June ~2 weeks. Please note that there can be delays if required to assure our quality standards. 

Generally giving permissions before starting the Unity player sounds like a viable solution since everything would intitialize after permissions are already given. I'm going to clarify that with our engineering team and come back to you. 

If you want to give permissions before creating the Unity Player, you need to make sure to give permissions for the Snapdragon Spaces services and the Application at that point. In theory it is a viable workaround but you will need to implement the checks that would usually be done by our Unity Plugin yourself. 

Login to post a comment