Android Camera2 front camera

前端 未结 4 1575
刺人心
刺人心 2021-02-19 02:46

I recently noticed that the Camera API is deprecated and I found the new API called Camera2.

I have read the documentation but I don\'t really understand it.

So

4条回答
  •  抹茶落季
    2021-02-19 03:31

    I used the code from the Google Camera2 API sample with some changes to get the front and back cameras working including saving the images locally and changing the shape of the TextureView by using an overlay.

    I dealt with image rotation using exif interface too.

    There is quite a bit of code so I'm going to post a link to my GitHub repo:

    https://github.com/craigspicer/Camera2API

    https://nullparams.com/camera-2-api-tutorial/

提交回复
热议问题