How can I record a Video in my Android App.?

后端 未结 10 1718
后悔当初
后悔当初 2020-11-22 11:34

How can I capture a video recording on Android?

10条回答
  •  不知归路
    2020-11-22 12:15

    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.)

提交回复
热议问题