Modern smartphone cameras contain sophisticated sensors and Image Signal Processors (ISP). The legacy Camera API (Camera 1) abstracts these features, limiting control over parameters like exposure time and focus distance. The Camera 2 API, introduced in Android Lollipop (API 21), models the camera pipeline as a pipeline of frames, allowing developers to:
// Target surfaces: Preview (SurfaceView/TextureView) + ImageReader builder.addTarget(previewSurface) builder.addTarget(imageReader.surface)
Modern smartphone cameras contain sophisticated sensors and Image Signal Processors (ISP). The legacy Camera API (Camera 1) abstracts these features, limiting control over parameters like exposure time and focus distance. The Camera 2 API, introduced in Android Lollipop (API 21), models the camera pipeline as a pipeline of frames, allowing developers to:
// Target surfaces: Preview (SurfaceView/TextureView) + ImageReader builder.addTarget(previewSurface) builder.addTarget(imageReader.surface) camera 2 apk