join us on Discord for support, updates, and all things Snap AR! See you there!
Camera Kit For Unity - Android permissions at start of app
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!