Sign up for our live Camera Kit office hour on July 17 @ 9:30am (PT) / 4:30pm (GMT)

Camera Kit For Unity - Android permissions at start of app

Options
Pico Alta
Pico Alta Posts: 22 🔥

Hello,

I've been using Camerakit for Unity for a while. Everything is working fine in my app, but one thing that bugs me is that for Android, when the app launches, all the needed permissions are asked before we actually see any app contents. UX-wise, this seems like a flow that is not ideal, since the user doensn't know yet what the app does and why the app needs the dangerous camera permission.

Is it possible to ask the camera permission at a later stage? We can use the Unity permission API to grant permissions and launch camerakit manually once the permissions have been granted.

I tried including <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true"/> in the AndroidManifest.xml in the app project, but that is not doing anything. This leads me to believe that the permission handling is done when CameraKit initializes.

I took a deep dive today and noticed that the permission handling is most likely inherited from CameraLayout.kt onAttachedToWindow, which is used by CameraActivity.kt, which is used by CustomCameraActivity.kt.

Since Cameralayout.kt is not editable, can this be added to the feature list of CamerKit in future releases, or would there be a way to work around this issue? It would help a lot!

Answers

  • JacekC
    JacekC Posts: 24 👻
    Options

    Hi,
    I am glad to hear that Camera Kit for Unity is useful for your integration! I will add this request to our backlog and we will let you know if we find any work arounds that we can share sooner.