Comments (7)
We are yet to do a release with this fix in. We had a few other things to get done before publishing the code. I will post again on this issue once we have done that.
from kbarcode.
Hi @OmarJoya . Thanks for reporting this, to clarify these are your steps to recreate:
- Be on Android 6 device
- Open app
- Request permission
- Once granted call barcode.start()
Is that correct?
from kbarcode.
Yes, also I added the BarcodeView as an observer to the lifecycle in onActivityCreated as you have on https://github.com/brightec/KBarcode/wiki
from kbarcode.
This exception does appear to be caused by affectively calling barcodeView.start()
twice, in quick succession.
I had previously thought the library handled calling start()
twice, as seen in BarcodeScanner.start()
where I check if the cameraSource.isStarted()
. However if you call twice in quick succession, the second time the camera source does not report as starting because it is still opening the camera.
I will create a pull request soon which will address this issue.
For your case @OmarJoya, you are right that marshmallow is the differing factor. It appears that permissions dialogs behave differently between M and Q (not sure exactly for each version in between). On M the permissions dialog causes @OnLifecycleEvent(Lifecycle.Event.ON_START)
to be called when it dismisses. On Q it does not.
A temporary work around while I get this pull request together, would be to do a version check before calling barcodeView.start()
after the permission is granted.
from kbarcode.
Pull request has been approved and merged.
from kbarcode.
does this last merge contain the fix?, I'm now using the kbarcode version 1.0.2, but seems the problem is not solved
from kbarcode.
We have now done a release which includes this fix.
https://github.com/brightec/KBarcode/releases/tag/v1.0.3
from kbarcode.
Related Issues (20)
- [FEATURE] Click to focus in barcode view HOT 6
- [BUG] Samsung Galaxy S9 HOT 2
- [FEATURE] Ui test HOT 6
- [QUESTION] - minSDK HOT 1
- [BUG] Screen Lag every second HOT 9
- RTFM: Does this lib support QrCode? HOT 1
- [FEATURE] Add a way to pause the camera preview, or clear the list of scanned barcodes. HOT 4
- Dim light
- The image quality is fairly poor. HOT 1
- [FEATURE] Toggle flash on/off HOT 2
- [BUG] Crash on VisionImageProcessorSingleBase$startDetection$2.onComplete() HOT 2
- [FEATURE] Black screen when Camera permission denied. HOT 1
- How to capture or retreive the Image frame being scanned HOT 3
- [BUG] Library doesn't work at all HOT 2
- [FEATURE] FirebaseVisionBarcode is deprecated, migrate to ML Kit SDK HOT 2
- [BUG] Black bar on the right HOT 1
- Crash on back HOT 2
- [FEATURE] Add Data Safety information HOT 1
- [BUG] Detection stops working when toggling flash HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kbarcode.