kroegerama / barcode-kaiteki Goto Github PK
View Code? Open in Web Editor NEWAndroidX and Camera2 based library for easy barcode scanning. Includes BarcodeView and different ready to use dialogs.
License: Apache License 2.0
AndroidX and Camera2 based library for easy barcode scanning. Includes BarcodeView and different ready to use dialogs.
License: Apache License 2.0
Since I integrated your barcode scanner library, some of my layouts are affected by bugs of ConstraintLayout v2.0.0-beta2. The issues were fixed with v2.0.0-beta3.
To fix the issues, I need to update the ConstraintLayout dependecy in my app to at least 2.0.0-beta3.
It would be great if you can provide a new library version with updated dependencies, so that my app does not depend on the library's version of ConstraintLayout.
BarcodeView uses the DisplayMetrics class but fails to initialise it as per the recommendations in the Android documentation for the class.
The offending code is here. I attempted to resolve it myself but getWindowManager()
requires an Activity
context which I couldn't obtain in the class.
Here's the snipped logcat for the crash.
The latest release was more than a year ago. It seems that the repository is abandoned. Am I wrong?
I think it would be useful to be able to tell if the user cancelled the scanning. Currently nothing is done but dismissing the dialog.
For me personally this would be useful, not sure if others would find that too.
Thanks for this library. Please add a viewfinder with the option to crop the analyzed image under its dimensions
BarcodeView read barcodes only then device in landscape mode now.
How to enable portrait mode support ?
Thanks!
Currently developing for an app that runs on a Android Lollipop (API 21)device, and I am getting the following exception:
E/AndroidRuntime: FATAL EXCEPTION: BarcodeAnalyzer
Process: com.a.myapp, PID: 21325
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6375)
at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:921)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:4691)
at android.view.View.invalidateInternal(View.java:11802)
at android.view.View.invalidate(View.java:11766)
at android.view.View.invalidate(View.java:11750)
at com.kroegerama.kaiteki.bcode.views.ResultPointView.clear(ResultPointView.kt:58)
at com.kroegerama.kaiteki.bcode.views.BarcodeView.onNoResult(BarcodeView.kt:77)
at com.kroegerama.kaiteki.bcode.BarcodeAnalyzer.analyze(BarcodeAnalyzer.kt:55)
at androidx.camera.core.ImageAnalysisNonBlockingCallback$1.run(ImageAnalysisNonBlockingCallback.java:150)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
Here's my Fragment:
public class KaitekiFragment extends BaseFragment<FragmentKaitekiBinding, ScanViewModel>
implements BarcodeResultListener {
...
...
@Override
public void onStart() {
super.onStart();
BarcodeAlertDialogKt.showBarcodeAlertDialog(requireContext(), getViewLifecycleOwner(), this,
Arrays.asList(BarcodeFormat.CODE_128,
BarcodeFormat.EAN_8,
BarcodeFormat.EAN_13,
BarcodeFormat.CODE_39,
BarcodeFormat.UPC_A,
BarcodeFormat.UPC_E,
BarcodeFormat.ITF), false);
}
@Override
public boolean onBarcodeResult(@NotNull Result result) {
viewModel.resultText.set(result.getText());
return false;
}
Hi,
Can you add option for simple fragment, instead of dialogs, alerts etc?
Thanks.
See #3: @alvindizon
I was able to reproduce this on my Pixel 3XL running Android 10. Logcat contains the following line:
W/Gralloc3: allocator 3.x is not supported
Will update/close this issue, if I find out more about this...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.