Implementing CameraX with Android Jetpack Compose

Who has struggled with device-specific issues? 🙋‍♂️

Having a large variety of devices comes with its challenges. With all the different models, out there, an app will look different depending on if it’s running in a large density screen or in a foldable. This was often the difficulty when you needed to implement your camera, previously to CameraX.

There were always issues related with a stretched preview or photo, or the camera wouldn't open, or there was no match between the preview and picture dimensions, and the list goes on and on.

Fortunately, Google added to Jetpack the CameraX library. It allows you to easily (and faster) implement your camera with the confidence that it will work perfectly on over 98% of the existing Android devices. It gets even better: it's backward compatible until Android 5.0. 

In this course, you'll learn how to create your own camera(x) and add it to your projects. 

Ready? May the best picture win!

Course Description

In this course, you'll learn how to implement a custom camera for your app using the CameraX library. You'll start with an existing app that's currently using the default camera to take a picture and record a video, and you'll migrate it to use your camera. To accomplish this, you'll start by creating a preview of what your camera is seeing, and then you'll add the photo and recording features. Once done, you'll use the Extensions API to add special effects to your photos: Auto, Bokeah (background blur), Face Retouch, HDR, and Night are some of the modes that you're going to implement.

Drag to resize
By the end of the course you will have mastered:

  • Your camera preview.
  • Take pictures
  • Record videos
  • Add special effects to your photos.

Meet the instructor

Drag to resize

Carlos Mota

Content Author & Course Instructor

He can easily be spotted either working on Android applications written in Kotlin or developing them along with Kotlin Multiplatform. An enthusiastic about new technology and always trying to reach those last 20% of all of his side projects that seem to be really far away. He loves to share his knowledge with others either by giving talks, teaching, writing, or along with a cold beer in the nearest pub. GDG Coimbra organizer and Kotlin evangelist, he also has a huge passion for travel, photography, space, and the occasional run.