Skip to content

Commit e7b3ade

Browse files
release of v6.0.5
1 parent f7d218d commit e7b3ade

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.0.5
2+
Bugs fixed:
3+
* [Android] Fixed crash due to imageProxy being closed too early.
4+
15
## 6.0.4
26
Bugs fixed:
37
* [Android] Fixed UI stutter when `returnImage` is true.

android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ class MobileScanner(
128128
}
129129

130130
if (!returnImage) {
131-
imageProxy.close()
132131
mobileScannerCallback(
133132
barcodeMap,
134133
null,
135134
mediaImage.width,
136135
mediaImage.height)
136+
imageProxy.close()
137137
return@addOnSuccessListener
138138
}
139139

@@ -151,16 +151,16 @@ class MobileScanner(
151151
val bmWidth = bmResult.width
152152
val bmHeight = bmResult.height
153153

154-
bmResult.recycle()
155-
imageProxy.close()
156-
imageFormat.release()
157-
158154
mobileScannerCallback(
159155
barcodeMap,
160156
byteArray,
161157
bmWidth,
162158
bmHeight
163159
)
160+
161+
bmResult.recycle()
162+
imageProxy.close()
163+
imageFormat.release()
164164
}
165165

166166
}.addOnFailureListener { e ->

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mobile_scanner
22
description: A universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS.
3-
version: 6.0.4
3+
version: 6.0.5
44
repository: https://github.com/juliansteenbakker/mobile_scanner
55

66
screenshots:

0 commit comments

Comments
 (0)