Android Kudan - Extending ARActivity will stop working system camera torch (Flash light)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 00:15:31

问题


I am working on kudan SDK for building 3D Model Augment Reality Object with Marker, all are perfectly works fine,but when i build Camera torch on same ARActivity will stop working flash light, even it will stop working system flash torch (On/off torch from system widgets)

if in case i will extends Activity not ARActivity works perfectly fine.

Throw Run-time Exception when extends ARActivity

02-08 10:15:32.631 7592-7592/techno.example.com.agumentation
 W/System.err: android.hardware.camera2.CameraAccessException:
 CAMERA_IN_USE (4): setTorchMode:1488: Torch for camera "0" is not
 available due to an existing camera user 02-08 10:15:32.631
 7592-7592/techno.example.com.agumentation W/System.err:     at
 android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:658)
 02-08 10:15:32.631 7592-7592/techno.example.com.agumentation
 W/System.err:     at
 android.hardware.camera2.CameraManager$CameraManagerGlobal.setTorchMode(CameraManager.java:878)
 02-08 10:15:32.631 7592-7592/techno.example.com.agumentation
 W/System.err:     at
 android.hardware.camera2.CameraManager.setTorchMode(CameraManager.java:51)

It would great to helping for solving this issue.

Thank you.

来源:https://stackoverflow.com/questions/48677759/android-kudan-extending-aractivity-will-stop-working-system-camera-torch-flas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!