GithubHelp home page GithubHelp logo

android-camerax-java's Issues

Doesn't save images

when you click capture button to take an image; it doesn't save the photo because it fails to creates/builds the file:
here's the logcat:

2020-08-14 14:38:44.163 9483-9577/com.akhil.cameraxjavademo D/UseCaseAttachState: All use case: [androidx.camera.core.ImageCapture-0979abeb-427d-4263-a0e0-08ebd6bd6cc4, androidx.camera.core.ImageAnalysis-97684dac-5def-4004-bf88-cdab562be28f, androidx.camera.core.Preview-3a6b536b-e1f7-4c79-b6d6-891f686e252d] for camera: 0
2020-08-14 14:38:44.171 9483-9577/com.akhil.cameraxjavademo D/UseCaseAttachState: Active and attached use case: [androidx.camera.core.ImageCapture-0979abeb-427d-4263-a0e0-08ebd6bd6cc4, androidx.camera.core.Preview-3a6b536b-e1f7-4c79-b6d6-891f686e252d] for camera: 0
2020-08-14 14:38:44.193 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Surface created.
2020-08-14 14:38:44.193 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Surface changed. Size: 1600x1200
2020-08-14 14:38:45.421 9483-9581/com.akhil.cameraxjavademo D/UseCaseAttachState: All use case: [androidx.camera.core.ImageCapture-0979abeb-427d-4263-a0e0-08ebd6bd6cc4, androidx.camera.core.ImageAnalysis-97684dac-5def-4004-bf88-cdab562be28f, androidx.camera.core.Preview-3a6b536b-e1f7-4c79-b6d6-891f686e252d] for camera: 0
2020-08-14 14:38:45.439 9483-9581/com.akhil.cameraxjavademo D/UseCaseAttachState: All use case: [androidx.camera.core.ImageCapture-0979abeb-427d-4263-a0e0-08ebd6bd6cc4, androidx.camera.core.ImageAnalysis-97684dac-5def-4004-bf88-cdab562be28f, androidx.camera.core.Preview-3a6b536b-e1f7-4c79-b6d6-891f686e252d] for camera: 0
2020-08-14 14:38:45.440 9483-9581/com.akhil.cameraxjavademo D/CaptureSession: Some surfaces were closed.
2020-08-14 14:38:45.441 9483-9483/com.akhil.cameraxjavademo D/PreviewView: Surface requested by Preview.
2020-08-14 14:38:45.443 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Surface destroyed.
2020-08-14 14:38:45.443 9483-9581/com.akhil.cameraxjavademo D/UseCaseAttachState: Active and attached use case: [androidx.camera.core.ImageCapture-0979abeb-427d-4263-a0e0-08ebd6bd6cc4, androidx.camera.core.Preview-3a6b536b-e1f7-4c79-b6d6-891f686e252d] for camera: 0
2020-08-14 14:38:45.445 9483-9581/com.akhil.cameraxjavademo D/UseCaseAttachState: All use case: [androidx.camera.core.ImageCapture-0979abeb-427d-4263-a0e0-08ebd6bd6cc4, androidx.camera.core.ImageAnalysis-97684dac-5def-4004-bf88-cdab562be28f, androidx.camera.core.Preview-3a6b536b-e1f7-4c79-b6d6-891f686e252d] for camera: 0
2020-08-14 14:38:45.459 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Surface created.
2020-08-14 14:38:45.459 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Surface changed. Size: 1600x1200
2020-08-14 14:38:45.461 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Surface set on Preview.
2020-08-14 14:38:45.461 9483-9582/com.akhil.cameraxjavademo D/CaptureSession: Opening capture session.
2020-08-14 14:38:45.726 9483-9582/com.akhil.cameraxjavademo D/CaptureSession: Attempting to send capture request onConfigured
2020-08-14 14:38:45.726 9483-9582/com.akhil.cameraxjavademo D/CaptureSession: Issuing request for session.
2020-08-14 14:38:45.731 9483-9582/com.akhil.cameraxjavademo D/CaptureSession: CameraCaptureSession.onConfigured() mState=OPENED
2020-08-14 14:38:45.731 9483-9582/com.akhil.cameraxjavademo D/CaptureSession: CameraCaptureSession.onReady() OPENED
2020-08-14 14:38:46.044 9483-9581/com.akhil.cameraxjavademo D/StreamStateObserver: Update Preview stream state to STREAMING
2020-08-14 14:38:47.378 9483-9483/com.akhil.cameraxjavademo D/ImageCapture: Send image capture request [current, pending] = [0, 1]
2020-08-14 14:38:47.380 9483-9581/com.akhil.cameraxjavademo D/CaptureSession: Issuing capture request.
2020-08-14 14:38:48.042 9483-9483/com.akhil.cameraxjavademo W/ExifInterface: Skip the tag entry since tag number is not defined: 2
2020-08-14 14:38:48.043 9483-9483/com.akhil.cameraxjavademo W/ExifInterface: Stop reading file since a wrong offset may cause an infinite loop: 0
2020-08-14 14:38:48.043 9483-9483/com.akhil.cameraxjavademo I/chatty: uid=10394(com.akhil.cameraxjavademo) identical 1 line
2020-08-14 14:38:48.043 9483-9483/com.akhil.cameraxjavademo W/ExifInterface: Stop reading file since a wrong offset may cause an infinite loop: 0
2020-08-14 14:38:48.044 9483-9747/com.akhil.cameraxjavademo W/System.err: androidx.camera.core.ImageCaptureException: Failed to write or close the file
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at androidx.camera.core.ImageCapture$3.onError(ImageCapture.java:669)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at androidx.camera.core.ImageSaver.lambda$postError$1$ImageSaver(ImageSaver.java:263)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at androidx.camera.core.-$$Lambda$ImageSaver$eAp-cZyzsEk-LVLazzLE-ezQzwo.run(Unknown Source:8)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at java.lang.Thread.run(Thread.java:919)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err: Caused by: java.io.FileNotFoundException: /storage/emulated/0/images/20200814143847.jpg: open failed: ENOENT (No such file or directory)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at libcore.io.IoBridge.open(IoBridge.java:496)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at androidx.camera.core.ImageSaver.run(ImageSaver.java:97)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err: 	... 3 more
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at libcore.io.Linux.open(Native Method)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7255)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err:     at libcore.io.IoBridge.open(IoBridge.java:482)
2020-08-14 14:38:48.045 9483-9747/com.akhil.cameraxjavademo W/System.err: 	... 6 more
2020-08-14 14:39:17.804 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Surface destroyed.
2020-08-14 14:39:17.804 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Surface invalidated androidx.camera.core.SurfaceRequest@3941d82
2020-08-14 14:39:17.818 9483-9577/com.akhil.cameraxjavademo D/UseCaseAttachState: All use case: [] for camera: 0
2020-08-14 14:39:17.822 9483-9483/com.akhil.cameraxjavademo D/StreamStateObserver: Update Preview stream state to IDLE
2020-08-14 14:39:17.825 9483-9577/com.akhil.cameraxjavademo D/UseCaseAttachState: Active and attached use case: [] for camera: 0
2020-08-14 14:39:17.826 9483-9577/com.akhil.cameraxjavademo D/UseCaseAttachState: Active and attached use case: [] for camera: 0
2020-08-14 14:39:18.236 9483-9577/com.akhil.cameraxjavademo D/CaptureSession: CameraCaptureSession.onClosed()
2020-08-14 14:39:18.238 9483-9483/com.akhil.cameraxjavademo D/SurfaceViewImpl: Safe to release surface.

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.