Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Problem handling permissions (ARFoundation + ARCore)

Discussion in 'AR' started by dylan-hart, Jul 24, 2019.

  1. dylan-hart


    Nov 10, 2016
    I'm trying to replicate the permissions handling from the AR Elements android app: An initial screen displays rationale for the android.permission.CAMERA permission with a button that creates the permission request dialog. The rationale screen remains until the permission is granted (the permission request dialog can be created and denied any number of times). Once the permission is granted, the main app AR experience starts.

    Is there a way to do this using ARFoundation 2.1.1 + ARCore 2.1.0?

    I'm using ARCorePermissionManager's IsPermissionGranted() and RequestPermission() methods to check and request the permission. The camera remains black after granting the permission! The camera starts working only after restarting the app. Is there an ARFoundation/ARCore method I need to invoke after the permission is granted, or something else I need to do? In the RequestPermission() callback I've tried arSession.enabled = true and arSession.Reset(). The first doesn't appear to have any effect and the second crashes the app.
  2. Jabu33


    Sep 3, 2018
    Have you found a solution?

    I am having same issue, it has not occurred on my previous builds, when I was using same AR Foundation libraries etc.

    After the app is installed the camera output is black and remain even after granting permissions I have to restart the app.