Showing
1 changed file
with
2 additions
and
1 deletions
| @@ -168,7 +168,8 @@ class MobileScannerHandler( | @@ -168,7 +168,8 @@ class MobileScannerHandler( | ||
| 168 | val position = | 168 | val position = |
| 169 | if (facing == 0) CameraSelector.DEFAULT_FRONT_CAMERA else CameraSelector.DEFAULT_BACK_CAMERA | 169 | if (facing == 0) CameraSelector.DEFAULT_FRONT_CAMERA else CameraSelector.DEFAULT_BACK_CAMERA |
| 170 | 170 | ||
| 171 | - val detectionSpeed: DetectionSpeed = DetectionSpeed.entries.first { it.intValue == speed} | 171 | + val detectionSpeed: DetectionSpeed = if (speed == 0) DetectionSpeed.NO_DUPLICATES |
| 172 | + else if (speed ==1) DetectionSpeed.NORMAL else DetectionSpeed.UNRESTRICTED | ||
| 172 | 173 | ||
| 173 | mobileScanner!!.start( | 174 | mobileScanner!!.start( |
| 174 | barcodeScannerOptions, | 175 | barcodeScannerOptions, |
-
Please register or login to post a comment