Coder Social home page Coder Social logo

Comments (18)

augonis avatar augonis commented on August 15, 2024 5

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.

Hackmodford avatar Hackmodford commented on August 15, 2024

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.

pavs23 avatar pavs23 commented on August 15, 2024

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.

MirzaSikander avatar MirzaSikander commented on August 15, 2024

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.

NameX44 avatar NameX44 commented on August 15, 2024

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.

MirzaSikander avatar MirzaSikander commented on August 15, 2024

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.

NameX44 avatar NameX44 commented on August 15, 2024

So you left this library ? or you updated it ? or found another one ?

from barcodescanner.

MirzaSikander avatar MirzaSikander commented on August 15, 2024

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.

NameX44 avatar NameX44 commented on August 15, 2024

could you tell me which one please ?

from barcodescanner.

bladnor avatar bladnor commented on August 15, 2024

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.

skalathingal avatar skalathingal commented on August 15, 2024

Any luck on this issue ?

from barcodescanner.

BadChoice avatar BadChoice commented on August 15, 2024

Not working yet?

from barcodescanner.

artemcarabash avatar artemcarabash commented on August 15, 2024

really? Thanks @augonis for your solution, I spent about 3 hours to find that it's all about permissions!

from barcodescanner.

fairchild88 avatar fairchild88 commented on August 15, 2024

@augonis you are right, thx

from barcodescanner.

heitorcolangelo avatar heitorcolangelo commented on August 15, 2024

In my case, I was forgetting to call scannerView.stopCamera() and scannerView = null in onDestroy method.

from barcodescanner.

HeesangLee avatar HeesangLee commented on August 15, 2024

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.

sergioc6 avatar sergioc6 commented on August 15, 2024

@augonis you are LEGEND my friend!

from barcodescanner.

dm77 avatar dm77 commented on August 15, 2024

The zxing sample now includes code that shows how you can request camera permissions.

from barcodescanner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.