Difference between camera and camera2 in Android

I am creating an application similar to social media where people can share photos and videos such as Instagram. This is why the camera is very important for my application. The Camera2 API is confusing to me. I want to run the application at API level 11+. I know that camera2 is only available at API level 21+. Therefore, I need to create two APIs, one (camera) for the older version and the second (camera2) for the higher version. The problem is that I just started to learn Android, and I don't know what the main difference between these two APIs is.

What are the main features available in the Camera2 API?
Or is there a flaw in the old camera API?

I need three things in my application.

1- Simple capture pictures 2- Quick shots (for creating GIF images) 3- Simple video recording.

Which camera API is right for me?

+4
source share
1 answer

The old camera API works fine for # 1 and # 3; if you're ok with GIF video modes, you can also do # 2.

You will need a camera2 (and then devices that support fast capture with full resolution), see BURST_CAPTURE or any device that supports the hardware level FULL .) If you want bursts with a resolution above ~ 1080p.

, CameraView . API, API .

+6

Source: https://habr.com/ru/post/1674905/


All Articles