Showing
1 changed file
with
5 additions
and
5 deletions
| @@ -231,13 +231,13 @@ class MobileScannerHandler( | @@ -231,13 +231,13 @@ class MobileScannerHandler( | ||
| 231 | 231 | ||
| 232 | private fun analyzeImage(call: MethodCall, result: MethodChannel.Result) { | 232 | private fun analyzeImage(call: MethodCall, result: MethodChannel.Result) { |
| 233 | analyzerResult = result | 233 | analyzerResult = result |
| 234 | - val uri = Uri.fromFile(File(call.arguments.toString())) | ||
| 235 | 234 | ||
| 236 | - // TODO: parse options from the method call | ||
| 237 | - // See https://github.com/juliansteenbakker/mobile_scanner/issues/1069 | 235 | + val formats: List<Int>? = call.argument<List<Int>>("formats") |
| 236 | + val filePath: String = call.argument<String>("filePath")!! | ||
| 237 | + | ||
| 238 | mobileScanner!!.analyzeImage( | 238 | mobileScanner!!.analyzeImage( |
| 239 | - uri, | ||
| 240 | - null, | 239 | + Uri.fromFile(File(filePath)), |
| 240 | + buildBarcodeScannerOptions(formats), | ||
| 241 | analyzeImageSuccessCallback, | 241 | analyzeImageSuccessCallback, |
| 242 | analyzeImageErrorCallback) | 242 | analyzeImageErrorCallback) |
| 243 | } | 243 | } |
-
Please register or login to post a comment