Code Monkey home page Code Monkey logo

Comments (5)

pvasa avatar pvasa commented on May 27, 2024

Do you see any errors in camera view error listener?

from cameraview-ex.

Wojtek1234 avatar Wojtek1234 commented on May 27, 2024

unfortunately no, app just hangs. It never comes to listeners, it hangs up on line 570 of CameraView class when it try to destroy camera object

from cameraview-ex.

pvasa avatar pvasa commented on May 27, 2024

@Wojtek1234 The reason chooseCameraIdByFacing() returns false could be because the hardware is not compatible with camera2 api on those devices. That is why it falls back to camera1 and return true which means the camera was started successfully.

Are you running sample app? If not, try the sample app and see if still facing same issue. Try adding a camera error listener first and then starting the camera. Please refer below snippet.

// add error listener first
cameraView.addCameraErrorListener { t, errorLevel -> 
   Log.e(javaClass.canonicalName, "Camera error", t)
}

// then start camera
cameraView.start()

from cameraview-ex.

ru-alxr avatar ru-alxr commented on May 27, 2024

Same bug.
Lib works perfectly on emulator, and fails on two real devices:
Lenovo a2016b30 (API 23)
Samsung SM-J810M (API 26)

Log contains these lines:

D/PermissionsManager: weaveJoinPoint: already has required permissions. Proceed with the execution.
I/CameraManagerGlobal: Connecting to camera service
D/VendorTagDescriptor: addVendorDescriptor: vendor tag id 3854507339 added
I/CameraManager: getCameraCharacteristics : cameraId = 0
I/CameraManager: getCameraCharacteristics : cameraId = 1
I/CameraManager: getCameraCharacteristics : cameraId = 0

from cameraview-ex.

pvasa avatar pvasa commented on May 27, 2024

@ru-alxr Thanks for posting the log, although it does not say anything about the actual issue. And I don't have hands on those devices right now so I cannot test them either.

There are some major improvements and features coming to camera1 implementation (which seems to be the problem here) of the lib. So I would suggest to look out for it and once the release is out, try running the new version on those devices. There is going to be a lot of bug fixes which might fix the issue that you and @Wojtek1234 are facing. Refer PR #147 for more info.

from cameraview-ex.

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.