Camera2 provides an API for accessing effects—bokeh, HDR, and others—that have been implemented by phone manufacturers for specific phones.
The CameraX library supports these same advanced effects through its own extensions API. For most developers, we recommend you use the CameraX extensions API to access these vendor extensions.
However, apps that have complex
Camera2
implementations can take advantage of the Camera2 extensions without having to
make significant changes to legacy code. The Camera2 extension APIs expose
exactly the same set of
effects as
in CameraX, and those are already supported on many different
devices, so you can use them without any
additional configuration.
For more information, see
CameraExtensionCharacteristics
and the Camera2 extensions app
on GitHub.