fix: Fix Failed to parse camera Id
error by ignoring non-integer cameras (#1428)
This commit is contained in:
parent
ba099e4044
commit
8833ac10c3
@ -181,7 +181,7 @@ class CameraViewModule(reactContext: ReactApplicationContext) : ReactContextBase
|
||||
|
||||
val cameraDevices: WritableArray = Arguments.createArray()
|
||||
|
||||
manager.cameraIdList.forEach loop@{ id ->
|
||||
manager.cameraIdList.filter{ id -> id.toIntOrNull() != null }.forEach loop@{ id ->
|
||||
val cameraSelector = CameraSelector.Builder().byID(id).build()
|
||||
|
||||
val characteristics = manager.getCameraCharacteristics(id)
|
||||
|
Loading…
Reference in New Issue
Block a user