Get started with camera on Android
Stay organized with collections
Save and categorize content based on your preferences.
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
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.
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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-07-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-02 UTC."],[],[],null,["# Get started with camera on Android\n\nThe camera enables an exciting range of application use cases such as capturing\nvideo and images for sharing with social media, to creating utilities such as\ndocument and QR Code scanning. This developer center provides documentation and\nresources to get started using the camera in your Android application.\n\nBuild a camera application\n--------------------------\n\nTo build a camera based application or incorporate camera into your\nexisting application, start by exploring the CameraX API: a streamlined API\nfor using the camera. This overview introduces CameraX and walks through\nsteps to use the camera.\n\n[Overview of CameraX](/media/camera/camerax)\n\nThe CameraX Codelab provides an example based approach to learning CameraX.\n\n[CameraX Codelab](/codelabs/camerax-getting-started)\n\nMigrate from Camera1\n--------------------\n\nIf your app uses the deprecated Camera class (\"Camera1\"), consider\nperforming a migration to CameraX, which will provide a stable and\nrobust platform that allows your application to take advantage of new camera\ncapabilities.\n\n[Migrate Camera1 to CameraX](/media/camera/camerax/camera1-to-camerax)\n\nLevel up your camera application\n--------------------------------\n\nCameraX facilitates direct integration with the [Machine Learning Toolkit\nlibrary](https://developers.google.com/ml-kit), MLKit. This allows camera to be\ncombined with MLKit to create things like QR scanners, document scanners and\nmore.\n\n[Create a QR Code scanner](/media/camera/camerax/mlkitanalyzer)\n\nCamera Extensions allows your application access to special device capabilities\nsuch as Night Mode image capture or Bokeh (Portrait) modes. Learn how to access\nCamera Extensions using both CameraX and Camera2 here.\n\n[Extend your app's camera experience](/media/camera/camerax/extensions-api)"]]