PTCInc / vuforia-engine

Bug and feedback issue tracker for the Vuforia Engine SDK
https://developer.vuforia.com
20 stars 0 forks source link

Flashlight Issues with OPPO Find X3 Lite 5G (Flashlight / Torch Control not working with ARCore) #89

Closed tsoen closed 9 months ago

tsoen commented 9 months ago

Summarize your device feedback I was having issues trying to enable the flash on my smartphone with Vuforia-Unity (the flash works fine using a Samsung smartphone or tablet). I kept getting the error message "Failed to set camera flash mode". Then I noticed in the Logcat console that there is an exception when starting the application. It looks like it happens when ARCore is initializing, so I am not sure there is something you can do on your side, but asking anyway.

ARCore-DeviceInformationHelper (package name) Failed to get CameraType set by Vendor java.lang.IllegalArgumentException: Could not find tag for key 'com.oppo.feature.motion.tracking.camera.name') at android.hardware.camera2.impl.CameraMetadataNative.nativeGetTagFromKeyLocal(Native Method) at android.hardware.camera2.impl.CameraMetadataNative.getBase(CameraMetadataNative.java:597) at android.hardware.camera2.impl.CameraMetadataNative.get(CameraMetadataNative.java:475) at android.hardware.camera2.impl.CameraMetadataNative.get(CameraMetadataNative.java:444) at android.hardware.camera2.CameraCharacteristics.get(CameraCharacteristics.java:295) at cxk.b(PG:6) at cxt.a(PG:3) at com.google.ar.core.services.CalibrationContentResolver.readDeviceProfile(PG:21) at com.unity3d.player.UnityPlayer.nativeRender(Native Method) at com.unity3d.player.UnityPlayer.access$500(Unknown Source:0) at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:126) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:240) at android.os.Looper.loop(Looper.java:351) at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)

Describe your device Device : OPPO Find X3 Lite 5G. Android 13. The main issue I encountered that lead me to this error is that I can't enable the flash with Vuforia (Unity). The AR (image target) is working fine. Note : the flash was working fine on this device when using the Wikitude's AR SDK.

Business Impact For the moment it is mostly quality of life since most of our users use Samsung devices, however that is not nothing we can force onto them. Also it means there could happen on other devices, and it would be a regression from the previous version of our app since we are migrating from Wikitude to Vuforia, and Wikitude did support the flash on this device.

Link to device manufacturer / device specifications https://www.oppo.com

ptc-pscheper commented 9 months ago

Hi there, sadly there's a consistent issue with flashlight control when using ARCore. Personally I have seen some ARCore enabled devices work just fine, others do not. This is a highly requested feature on their issue tracker: https://github.com/google-ar/arcore-android-sdk/issues/153 & https://github.com/google-ar/arcore-android-sdk/issues/356.

My recommendation would be to reach out to Google through the above issues. The only workaround for Vuforia Engine is to disable ARCore, but that comes with its own performance challenges and feature limitations. For now this issue will be closed as this is a Google ARCore specific issue. I'm sorry I cannot be of more help.

Note: The title was updated to reflect the issue better for findability.

tsoen commented 3 months ago

Hi, As @ptc-pscheper mentionned in https://github.com/google-ar/arcore-android-sdk/issues/153, it seems Google added Flash Mode to ARCore v1.45.

Maybe I should create a new ticket about this.