Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAMERA_UNAVAILABLE on Samsung A23: black screen #1553

Open
ironmanromeo opened this issue Nov 25, 2022 · 12 comments
Open

CAMERA_UNAVAILABLE on Samsung A23: black screen #1553

ironmanromeo opened this issue Nov 25, 2022 · 12 comments
Labels

Comments

@ironmanromeo
Copy link

SPECIFIC ISSUE ENCOUNTERED

Hello everybody. This is not a strictly SceneForm-related issue but indirectly it is. It is not clear if it was SceneForm that caused it or it is a problem with the phone: it happens that on a newly purchased Samsung A23 the camera no longer has the privileges and does not start. The error obtained from a native HelloWorld Java ArCore app returns that the camera is in use by another application. There is no need to close all the apps, delete them, re-install them: nothing is done. I also downloaded the demo app https://play.google.com/store/apps/details?id=com.gorisse.thomas.ar.environmentlights on the phone which has the same problem: the screen stays black. Access to the room has been given to all apps. The system camera app was restarted and I reset the settings: nothing to do. I don't know how it happened but on one occasion the camera unlocked and the apps worked, but once closed and reopened they no longer worked. Looking online "it seems" that the problem is limited to only some Samsung phones, even the A23 is not mentioned because it is still new. Tips? Thanks in advance.

https://developers.google.com/ar/reference/java/com/google/ar/core/TrackingFailureReason

Motion tracking paused because the camera is in use by another application. Tracking will resume once this app regains priority, or once all apps with higher priority have stopped using the camera. Prior to ARCore SDK 1.13, NONE is returned in this case instead.

VERSIONS USED

  • Android Studio: Android Studio Dolphin | 2021.3.1 Patch 1 - Build #AI-213.7172.25.2113.9123335, built on September 30, 202
  • ARCore SDK for Android: 'com.google.ar:core:1.34.0'
  • Device manufacturer, model, and O/S: Samsung A23-5G
  • Google Play Services for AR (ARCore): 1.34.22640223
    On Windows, use: adb shell pm dump com.google.ar.core | findstr /i "packages: versionName"
    On macOS, use: adb shell pm dump com.google.ar.core | egrep -i versionName\|packages:
  • Output of adb shell getprop ro.build.fingerprint:

Packages:
versionName=1.34.222640223
Hidden system packages:
versionName=0

STEPS TO REPRODUCE THE ISSUE

  1. Build and install ArCore HelloWorld Java
  2. open the app
  3. black screen

WORKAROUNDS (IF ANY)

ADDITIONAL COMMENTS

@agGitHub
Copy link

Any update? Also have this issue.

@matejnevlud
Copy link

Tested on latest HelloWorld Java ArCore example, still black screen.

@PauGuillamon
Copy link

Same issue here with Samsung Galaxy A23 5G.
Android build number: TP1A.220624.014.A236BXXU4CWE3
I tested it with ARCore 1.37 and 1.38 and I also get reports from users that the device was never able to handle any AR app. Uninstalling and reinstalling ARCore did not help.

ARCore seems to not be able to open the rear camera. The result of Session.update() is a Frame with timestamp always 0.
When using the front camera, ARCore seems capable of opening it but unable to do any tracking.

Opening the camera through another library, such as Camera X, works fine. Also the system camera app works as expected (including face recognition). So it doesn't seem to be a hardware problem.

@PauGuillamon
Copy link

It also affects Unity. According to Unity-Technologies/arfoundation-samples#1079, it worked fine with Unity 2020.3.23f1.
Once I get access to a Galaxy A23 I'll test different ARCore versions to hopefully get the specific version that broke it.

@matejnevlud
Copy link

Tried using hello_ar_java sample from ARCore 1.20 and it`s working on A23 !!

https://github.com/google-ar/arcore-android-sdk/tree/v1.20.0

@PauGuillamon
Copy link

ARCore 1.22 (the one used in Unity 2020.3.23.f1) also works fine.
ARCore 1.32 did not work.

@ninjadev64
Copy link

I have the same issue on a Motorola Moto G8 Power (disguised as a Pixel 5 through root) using the HelloAR Kotlin sample. Is the solution just to downgrade ARCore?

@yanadelrey
Copy link

yanadelrey commented Aug 16, 2023

On Android 12 (API level 31) or later, make sure that "Block Camera" is set to OFF in system settings.

I randomly found it here in Errors section lol: https://developers.google.com/ar/design/interaction/ui

Tell me if it works. (btw I am a UX Designer)

@tiofeliz
Copy link

tiofeliz commented Sep 5, 2023

On Android 12 (API level 31) or later, make sure that "Block Camera" is set to OFF in system settings.

I randomly found it here in Errors section lol: https://developers.google.com/ar/design/interaction/ui

Tell me if it works. (btw I am a UX Designer)

Where do i set that off i cant found it anywhere :(

@PauGuillamon
Copy link

@yanadelrey that's not the case, the camera is accessible through the Camera2 API.

Bug is still reproducible with ARCore 1.40.

@thecnoNSMB
Copy link

A year later and this is still an issue. Should this be noted as a device-specific issue in #89 or is that thread dead?

@cosminstefanxp
Copy link

Hello, any updates on this? We've been stumbling upon this on Samsung A33. It seems it used to work with AR Core 1.21, but then something got broken. And the behaviour is that AR system cannot take ownership of the cameras.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants