This course is available as part of the raywenderlich.com Professional subscription. To learn more click here

CameraX: Getting Started

Pro

Jan 1 2020 · Video Course (49 mins) · Intermediate

Learn how to create a camera app with the recently announced CameraX API for Android, which allows you to easily implement previews and real-time image analysis.

4/5 6 Ratings

Version

  • Kotlin 1.3, Android 5.0, Studio 3.5

Work with CameraX

Learn what CameraX is and how it makes your app development easier by providing an easy to use API that works consistently across different devices with different manufacturers.

1

In this episode, you'll add CameraX dependencies and learn how to request permissions at runtime.

2

TextureView allows you to display a preview. Learn how to configure your TextureView to listen for changes in your device's orientation.

3

In this episode, learn how to display a preview of the picture you will take by creating a preview use case.

4

Learn how to give your users the power of choosing which camera they want to use to take a picture: front or back.

5

A camera app is only useful if it can take pictures. Learn how to take pictures with the camera and save them to local storage.

6

Learn how to configure the flash to turn it on or off according to the user's actions.

7

Work with the Image Analyzer

Create a class that extends from ImageAnalysis.Analyzer and will display the average luminosity of a picture.

8

One of the most interesting features of CameraX is the ability to implement an image analyzer which allows you to analyze images using frameworks such as Firebase. Here, learn to create a Firebase project to use in your app.

9

Learn how to create a class that extends from ImageAnalysis.Analyzer and will display the raw value of your QR code.

10

Who is this for?

This course is intended for Advanced Android developers who are interested in migrating from the old Camera2 APIs. This course expects you to be familiar with Android Studio, Android Development with Kotlin and to have experience with file management and runtime permissions. Familiarity with the Camera2 API is recommended but not required.

Covered concepts

  • Adding permissions to the Android manifest
  • Requesting runtime permissions for the camera.
  • Preview use case with a TextureView
  • Image Capture use case
  • Image Analysis use case

Contributors

Comments