Releases: brightec/KBarcode
v1.3.0
Headline Features
Tap to Focus, Camera Flash Mode, Firebase ML to Play Services MLKit
Migration
Migrating to version 1.3.0
of KBarcode does involve a couple of small changes to your code.
ScaleType to PreviewScaleType
We have renamed all uses of ScaleType to PreviewScaleType. This clarifies more precisely what this attribute does. It also means
KBarcode shouldn't clash with camerax lib should you have both installed. The behaviour of this attribute hasn't changed.
Depending on exactly how you've implemented KBarcode, you should simply be able to replace your use like for like. For example:
XML: app:scaleType="centerInside"
-> app:previewScaleType="centerInside"
Kotlin: .scaleType(BarcodeView.CENTER_INSIDE)
-> .previewScaleType(BarcodeView.CENTER_INSIDE)
Deprecated setBarcodeFormats removal
The deprecated setBarcodeFormats
method which was deprecated in 1.0.3 has now been removed. Please make use of the IntArray
replacement for this method.
KBarcode/releases/tag/v1.0.3
Changes
- Dependency updates
- Build tools
3.6.1
->4.2.1
- Gradle
5.6.4
->6.7.1
- Kotlin
1.3.71
->1.4.32
- Google services
4.3.3
->4.3.8
- Build tools
- Library dependency updates
- Coroutines
1.3.4
->1.4.3
- Various test dependencies
- Coroutines
- Sample app dependency updates
- Material
1.1.0
->1.3.0
- Constraint layout
1.1.3
->2.0.4
- Firebase migrated to BOM
28.1.0
- Lifecycle-common-java8
2.2.0
->2.3.1
- Various test dependencies
- Material
- Removed JCenter
- Compile and target SDK
29
->30
- Migrated
firebase-ml-vision
toplay-services-mlkit-barcode-scanning
#39 - Added Camera Flash Mode feature #28
KBarcode/wiki/Reference#camera-flash-mode - Added Tap To Focus feature #11
KBarcode/wiki/Reference#clear-focus-delay
KBarcode/wiki/Under-the-Hood#tap-to-focus
How has ‘Tap to Focus’ evolved over the years on Android? - Set library into Kotlin explicit api mode
- Renamed ScaleType to PreviewScaleType
- Added a CameraX example
CameraX: An Introduction - Removed synthetics in favour of view binding. Guide
v1.2.3
API Changes
The cameraFacing
property in FrameMetadata
is now optional because some devices fail to report this value reliably every time (but usually expected to be present).
v1.2.2
Changes:
- Coroutines 1.3.3 -> 1.3.4
v1.2.1
Update from 1.2.0 -> 1.2.1 will be required.
There was an issue with the 1.2.0 artifact meaning a class wasn't included. Fixed this issue.
v1.2.0
We have fixed the sorting of barcodes not being used. We are now targeting Java8 in order to be able to use the latest tooling.
Changes
- Fixed bug where the sort wasn't being applied correctly
- Now targeting Java 8
- Updated our CI configuration
- Updated our quality checking tools
- Build tools 3.5.3 -> 3.6.1
- Gradle 5.4.1 -> 5.6.4
- Firebase Core 17.2.2 -> 17.2.3
- Firebase ML 21.0.0 → 24.0.1
- Added Firebase ML Barcode 16.0.2
- Kotlin 1.3.61 → 1.3.70
- Material 1.0.0 -> 1.1.0
- Lifecycle 2.1.0 -> 2.2.0
- Coroutines 1.3.2 -> 1.3.3
- Updated various testing dependencies
v1.1.1
Changes
- Added better exception handling for
createCaptureSession()
- Added causes and messages to some camera exceptions
- Added better exception handling for
openCamera()
- Added better exception handling for
createCaptureRequest()
andsetRepeatingRequest()
- Moved the closing of the image reader to before the closing of the camera. This fixes a bug where, in a small number of cases there is no camera facing available in the
onImageAvailable
callback - Firebase Core 17.2.1 → 17.2.2
- Kotlin 1.3.50 → 1.3.61
v1.1.0
v1.0.5
We highly recommend updating from 1.0.4 to 1.0.5, since this update fixes a a couple of significant issues.
Coroutine Fixes
#23
Made some fixes to the way we use coroutines. Cancelled the current job rather than scope so that we can launch new coroutines from the same scope. Changed our Firebase call to be a suspend call.
Surface Invalid
#22
Added a check after opening the camera to ensure that the surfaces are still valid.
v1.0.4
Lag Fix [#19]
There were some dropped frames in some cases. This was caused by FirebaseVisionImage.fromMediaImage(image, frameMetadata.rotation)
taking too long. To solve we introduced coroutines to the project and made this run on a background thread.
Miscellaneous
Dependencies
- Various test dependencies
- Build tools 3.4.0 -> 3.5.1
- Firebase core 16.0.9 -> 17.2.0
- Various lifecycle dependencies
- Google service 4.2.0 -> 4.3.2
- Gradle 5.1.1 -> 5.4.1
- Firebase ML Vision 20.0.0 -> 21.0.0
v1.0.3
IntArray
We have changed the API to now use IntArray instead of Array for barcode formats. We did this because IntArray is more efficient. We have deprecated the previous method, and it will be removed in a future release. We have offered a quick fix replacement if you are using Android Studio. You may wish to consider making changes in your code to utilise IntArray and gain the efficiencies too.
Just put your cursor on the method and use your shortcut for quick fix
https://developer.android.com/studio/intro/keyboard-shortcuts
Project quick fix (show intention actions and quick fixes) | Alt + Enter | Option + Enter
start() Fixes
#13 - See this issue for some more details
In summary calling start()
twice in quick succession caused issues because our Camera2Source
was only tracking isStarted()
and not "is starting". We have now added this in the form of isOpening()
, meaning it should now be safe to call start()
twice.
Miscellaneous
Dependencies
- Kotlin: 1.3.21 -> 1.3.31
- Build tools: 3.3.2 -> 3.4.0
- Firebase Core: 16.0.8 -> 16.0.9
- Firebase ML: 19.0.3 -> 20.0.0
Quality
We updated our quality config files to our latest standards here at Brightec. This caused a few minor changes in order to fix out some newly identified inefficiencies.