Comments (18)
I had this issue on Nexus 5 with Android 6.0.
Turns out I had to go into android settings>applications> (app) >permissions and explicitly allow access to the camera.
Hope this is helpful for someone.
from barcodescanner.
I am also getting a black screen with a red line. I tried both zbar and zxing�.
I have an original Nexus 7 with Android 4.4.4
Only have a front camera
from barcodescanner.
Make sure you have the permission to use the camera in your manifest. Also make sure that you end any other processes using the camera
from barcodescanner.
Any luck with this? I am also getting sort of the same problem. What happens with my application is that I am able to get one barcode scanned but it does not work the second time around.
When StartCamera()
is executed, the logcat prints out:
An error occured while connecting to camera:0
but it seems to be still working as the camera starts and I am able to get the callback after I scan a barcode. In the handleRequest function I try to stop the camera using StopCamera()
but it does not seem to work and in the logcat, it prints out
An error occured while connecting to camera:0
I also tried manually getting hold of the camera after the first barcode scan, but it crashes the application. Although, I have no issue with grabbing the camera and releasing it before the activity is started.
from barcodescanner.
Same here. Can't scan 2 barcode. When i startCamera a second time I've got this :
"An error occured while connecting to camera:0"
Does someone found a solution ?
Tried many things in the stopCamera() method but nothing works..
from barcodescanner.
I sort of figured out the problem, but not the solution :(
The issue is that the camera api being used has been deprecated.
On Mar 9, 2015 8:42 AM, "NameX44" [email protected] wrote:
Same here. Can't scan 2 barcode. When i startCamera a second time I've got
this :"An error occured while connecting to camera:0"
Does someone found a solution ?
Tried many things in the stopCamera() method but nothing works..
—
Reply to this email directly or view it on GitHub
#42 (comment).
from barcodescanner.
So you left this library ? or you updated it ? or found another one ?
from barcodescanner.
Yeah I switched to another one. I would recommend searching on github for
projects that have been recently updated or contributed to.
On Mar 9, 2015 2:32 PM, "NameX44" [email protected] wrote:
So you left this library ? or you updated it ? or found another one ?
—
Reply to this email directly or view it on GitHub
#42 (comment).
from barcodescanner.
could you tell me which one please ?
from barcodescanner.
I have exactly the same issue. I use appcompat-v7:21.0.3 library with Android Version 4.4.4. Is there already a fix for it?
from barcodescanner.
Any luck on this issue ?
from barcodescanner.
Not working yet?
from barcodescanner.
really? Thanks @augonis for your solution, I spent about 3 hours to find that it's all about permissions!
from barcodescanner.
@augonis you are right, thx
from barcodescanner.
In my case, I was forgetting to call scannerView.stopCamera() and scannerView = null in onDestroy method.
from barcodescanner.
In my case, same issue was solved after rebooting.
Maybe other camera application didn't unlock hardware camera before.
But It seem to be application problem If someone download and use my app at first.
Anyone know to solve this kind of camera issue by programmatic method?
from barcodescanner.
@augonis you are LEGEND my friend!
from barcodescanner.
The zxing sample now includes code that shows how you can request camera permissions.
from barcodescanner.
Related Issues (20)
- Adjust exposure/brightness HOT 1
- Not Scanning properly with dual or triple back camera android devices HOT 3
- Encoded contend don't work HOT 1
- Hiding the view leaves an image the background
- error while running app with basic implementation of Zxing HOT 2
- I want to continue scanning Until Correct QR found HOT 1
- MultiFormatReader unable to read the qr although the qr is scannable. HOT 2
- Plus openCv for grayscale QR code scanning HOT 1
- while setting flask
- Scanner frame size
- move scanner area to top of camera screen?
- I keep getting this error!?
- getting crash while trying to scan through camera
- java.lang.RuntimeException: cancelAutoFocus failed java.lang.RuntimeException: cancelAutoFocus failed at android.hardware.Camera.native_cancelAutoFocus(Native Method)
- Extract the type of barcode
- Cannot cast 'android.view.View' to 'CodeScannerView'
- Cancel Button throws Java Exception HOT 1
- # CameraHandlerThread(7190) java.lang.OutOfMemoryError
- it keep displaying me on full screen, but i don't want on full screen
- VERY OLD version of zbarimg in macOS HOT 1
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 barcodescanner.