Search Unity

ARFoundation & android google play camera permissions

Discussion in 'AR' started by enhawk, Nov 28, 2018.

  1. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    Seems it doesn’t write this to the manifest for non-development builds, anyone else having the same issue? Google Play throws an error on apk upload. I checked the apk in Android Studio and theres no entry in the Unity generated manifest for android.permission.CAMERA
     
    Last edited: Nov 28, 2018
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    When I decode the manifest generated from the samples, I see

    <uses-permission android:name="android.permission.CAMERA"/>

    Are you building with ARCore optional or required?
     
  3. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    From this other thread, I think you're talking about the new 2018.3 feature for building app bundles. I haven't tried uploading that to Google Play, but I do see the expected entries in its manifest. Can you confirm/clarify this is what you're looking at?
     
  4. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    Is this the "ARCore Supported" setting in PlayerSettings > XR Settings ? I'm not seeing an ARCore optional / required setting in Unity.

    On Unity 2018.2
     
    ROBYER1 likes this.
  5. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    Hmm, okay, let's back up.

    "ARCore Supported" enables support for Google's ARCore SDK for Unity. This is separate from the ARCore package provided by Unity, and you cannot have both at the same time.

    The apk manifest will specify whether ARCore is optional or required, which affects who can install the app (you need an ARCore supported device to download an ARCore required app, but anyone can install an AR optional app). See the documentation on how to specify it.

    Can you post a screenshot of the build window so I can try to replicate your exact settings? Something like this:
    AndroidBuildSettings.png

    And finally, you mentioned
    What is the error?
     
  6. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
  7. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    Thanks for the reply,

    My solution was to add it manually with an extra manifest in the unity project.

    Not sure why it wasn't adding. I'm not using ProGuard.

    My settings are the same as your's above except Development Build is off because those can't be uploaded to Google Play.

    Google Play refuses the APK with the warning "android.permission.CAMERA is missing from the manifest".

    The ARCore XR plugin is the only version of ARCore I have in the project.
     
    ROBYER1 likes this.
  8. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Same issue here