I have issues on some phones that I can't test on (that's the first problem) I'm trying to build a service that can record from camera2 API. But when I send the app to the background, on some phone it appears to have issues that I am failing to solve at the moment. I only have logs and cannot figure out the main reason for the app not working.
Thank you for helping
You'll find the actual source code that solved my problem here: https://bitbucket.org/dreamappsfr/kinghul
This was a POC that has been stopped. I honestly don't remember how I overcome this specifical issue at that time.
Camera2 is the latest low-level Android camera package and replaces the deprecated Camera class. Camera2 provides in-depth controls for complex use cases, but requires you to manage device-specific configurations. You can read about specific Camera2 classes and functions in the reference documentation.
Level_3: These devices support YUV reprocessing and RAW image capture, along with additional output stream configurations on top of full Camera2 API support. External: Similar to LIMITED devices with some exceptions (e.g. some sensor or lens information may not be reported or have less stable frame rates).
In order to use the most recent version of GCam (7.0), your Android device will need to support the Camera2API. Check for app compatibility by installing and then launching the free Camera2 API Probe app. If it reads “LEVEL 3,” “FULL,” or “LIMITED,” you should be fine.
You would try with:
Camera2-Video
Basically it is a wrapper for the video capture using Camera2
.
Add you your build.gradle
file:
compile 'com.wesleyelliott:camera2-video:0.0.2'
and create a Fragment
extended from com.wesley.camera2.fragment.Camera2Fragment
and override the methods getTextureResource
and getVideoFile
.
To start recording, you must use the method: startRecordingVideo()
, to stop it stopRecordingVideo
and to check if the app is currently recording a video or not, a method isRecording()
.
I already used it and is the simpler way to record a video with Camera2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With