How can I capture a video recording on Android?
As of December 2017, there have been some updates, e.g. the usage of android.hardware.Camera
is deprecated now. While the newer android.hardware.camera2
comes with handy things like a CameraManager
.
I personally like this example a lot, which makes use of this current API and works like a charm: https://github.com/googlesamples/android-Camera2Video
It also includes asking the user for the required permissions at start and features video preview before starting the video recording.
(In addition, I find the code really beautiful (and this is very rare for me ^^), but that's just my subjective opinion.)