A simple demo tutorial of the implementation of Android CameraX with Java
akhilbattula / android-camerax-java Goto Github PK
View Code? Open in Web Editor NEWA simple demo tutorial of the implementation of Android CameraX with Java
A simple demo tutorial of the implementation of Android CameraX with Java
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.