Make sure Qr Code fragment doesn't use Static Picture camera device

This commit is contained in:
Sylvain Berfini 2025-03-13 12:17:19 +01:00
parent dd167e56af
commit 2e3e78ee39

View file

@ -109,11 +109,15 @@ class QrCodeViewModel
}
}
val first = core.videoDevicesList.firstOrNull()
if (first != null) {
Log.w("$TAG No back facing camera found, using first one available [$first]")
coreContext.core.videoDevice = first
for (camera in core.videoDevicesList) {
if (camera != "StaticImage: Static picture") {
Log.w("$TAG No back facing camera found, using first one available [$camera]")
coreContext.core.videoDevice = camera
return@postOnCoreThread
}
}
Log.e("$TAG No camera device found!")
}
}
}