Get started with camera on Android

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.

Overview of CameraX

The CameraX Codelab provides an example based approach to learning CameraX.

CameraX Codelab

Migrating 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.

Migrate Camera1 to CameraX

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.

Create a QR Code scanner

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