Image detection example shows a black background screen

  • Issue category: Unity Example Package
  • Device type & OS version: Samsung Galaxy S21 with Android 11 installed targeting Android 10.0 (API level 29)
  • Host machine & OS version: Windows 10
  • Issue Environment : Unity Mock / On Device
  • ARDK version: 1.1.0
  • Unity version: 2022.1.0a16

Description of the issue:
Image detection example shows “Toggle Log”, “Enable Yeti Image”, “Enable Code Created Manager” and “Disable Inspector Created Manager” buttons with a black background screen.

Steps to reproduce:

  1. Open Unity Hub and create a new project from the “3D” template.

  2. In Unity Editor open build settings and switch platform to Android.

  3. Open player settings, turn off Auto Graphics API and remove Vulkan from the list, such that only OpenGles3 remains.

  4. Scroll down and set minimum API level to Android 7.0 ‘Nougat’ (API level 24).

  5. Set Target API level to Android 10.0 (API level 29).

  6. Set scripting backend to IL2CPP.

  7. Under target architectures, turn off ARMv7 and turn on ARM64.

  8. Import custom package “ardk-1.1.0.unitypackage” and click “Yes, just for these files” in the Script Updating Consent pop up window.

  9. Import custom package “ardk-examples-1.1.0.unitypackage”.

  10. Close Unity Editor, open Unity Hub and open the newly created project which was created in step 1.

  11. Add ARDK_MockWorld layer.

  12. In the project panel go to Assets > ARDKExamples > Image Detection and open the ImageDetection.unity scene file.

  13. In Unity Editor open build settings and switch platform to Android.

  14. Make sure the device is set to Developer Mode with USB Debugging turned on.

  15. Connect the device to the computer via USB and verify at “Run Device” that it is detected in the build settings.

  16. In Unity Editor choose Build And Run and click “Yes, just for these files” in the Script Updating Consent pop up window…

Sorry to hear that you’re facing an issue with the ImageDetection example. We tried to reproduce the issue on our end, however, we were able to build and run the application on an android device successfully.

In your case, if the app has been built and deployed to a device and still shows a black screen for the camera, then there might be camera permission on the device that’s not being allowed at runtime. To fix that, check the app permissions and enable camera, location, and storage permissions.

Hope this helps!