Camera not working in ARDK Exemples

Include the following details (edit as applicable):

  • Issue category: Unity Example Package
  • Device type & OS version: Android / iOS / Other Ex. iPhone 8+ on iOS 13
  • Host machine & OS version: Windows 10
  • Issue Environment : On Device
  • Xcode version:
  • ARDK version: 1.3.1
  • Unity version: 2020.3.33f1

Description of the issue:
Hello all,

I’m currently trying to learn to use lightship.
I’ve imported ARDK, the exemples, the mock environment and meshes, done the project configuration by having only OpenGLES3 and 2 as graphics API, set the minimum API level as 24 and it’s target as automatic, Scripting backend is IL2CPP and API compatibility on .NET 4.x, Target architectures as ARMv7 and ARM64.

I have a Huawei P smart Z (Android 10) and when building an exemple scene on it, when launching it I get the pop-up to accept or deny access to camera and when I accept it the screen stays black with the buttons of the scene.

I’m wondering if someone would know what the issue could be so I could really start my project.

Hello Nevin,

Could you please send us a screenshot of your project settings under the player section? This will help us diagnose your problem further.

Here’s the Player section from the Project settings

Hi @Nevin , those settings appear to be more or less correct, but you might want to try the following:

  • Change the Minimum API Level to Android 5.0 ‘Lollipop’ (API level 21)

  • Remove OpenGLES2 from your Graphics APIs

Also, there may be permissions other than the camera when the app is installed to the device that need to be enabled (e.g. Location, etc.) You can try enabling those permissions to see if that helps.

Another thing that I should point out is that the device you mentioned hasn’t been officially validated to work with ARDK, although it’s quite possible that the device is capable enough, but just hasn’t been validated. ARDK system requirements can be found here, in case you’re curious.

And finally, since you’re targeting an API Level higher than API 29, you might find the information under Building for Android 11 (API level 30) and higher in Building ARDK Apps for Android helpful. The most common issue that people run into here is a message to update Google Play Services for AR, but I have heard of instances where this results in a black screen instead.

If none of these steps help, please let me know which example scenes that have the issue and we can investigate further. Thanks.

Hi @David_Quevedo thanks for your answer, unfortunately none of those solutions seems to make the scenes work with AR.

I’ve mainly tried to make it work with Semantic Segmentation and Depth scenes and even with all the steps you gave me it doesn’t work.

Thanks @Nevin , I did some testing and it looks like there is bug that affects certain devices that would cause this behavior. At this point I’m thinking that you are hitting this bug. If you have a Pixel 6 to test with, you should be able to see the camera feed in the SemanticSegmentation scene to verify. I was able to confirm that it affects the Pixel 4 currently, but I don’t have access to your specific device to test with.

That’s unfortunate, I don’t have a Pixel 6, but thanks for the answers anyway @David_Quevedo. I guess it’ll be harder for a group project to test it out, for the multiplayer especially.

Ugh, sorry to hear that. I can say that we are working on a fix for the issue, which should be available in the near future. I’ll keep you posted when that does show up.

Update, this is actually related to the version of Google Play Services for AR that’s installed on the device. So if you’re on the latest version (1.31) you should be hitting the bug. If you are on the previous version (1.30) then it should not affect your device. Apologies for the error in my previous post.

1 Like

Thanks for the help, that was indeed the problem, now it works !

Glad to hear it! We’re still working on a fix for the newer version, and I’ll update the thread when that’s available.