The camera enables an exciting range of application use cases such as capturing video and images for sharing with social media, to creating utilities such as document and QR Code scanning. This developer center provides documentation and resources to get started using the camera in your Android application.
Build a camera application
To build a camera based application or incorporate camera into your existing application, start by exploring the CameraX API: a streamlined API for using the camera. This overview introduces CameraX and walks through steps to use the camera.
The CameraX Codelab provides an example based approach to learning CameraX.
Migrate from Camera1
If your app uses the deprecated Camera class ("Camera1"), consider performing a migration to CameraX, which will provide a stable and robust platform that allows your application to take advantage of new camera capabilities.
Level up your camera application
CameraX facilitates direct integration with the Machine Learning Toolkit library, MLKit. This allows camera to be combined with MLKit to create things like QR scanners, document scanners and more.
Camera Extensions allows your application access to special device capabilities such as Night Mode image capture or Bokeh (Portrait) modes. Learn how to access Camera Extensions using both CameraX and Camera2 here.
Extend your app's camera experience