The Kotlin Android Camera2 API TextureView development tutorial describes how to add a TextureView to the Preview Fragment.
This tutorial will consist of two parts.
- The initial setup of the base code
- Adding the TextureView to the Fragment layout file
In this Kotlin on Android tutorial we will also cover:
- Using Kotlin Reflection for accessing a Java class file
- How to add logging to a Fragment file
- The usage of the @JvmStatic tag
- How to add a TextureView to a Fragment layout file
- Creating a SurfaceTextureListener
Episodes
Each episode will be released to the site on a weekly basis.
- Create TextureView
- Camera2 EasyPermissions
- Get Id for Camera Device
- Connect to Camera Device
- Display Rear Camera
- Display front Camera (Premium)
- Using Preview with SurfaceView (Premium)
The starting code for this tutorial is based on the fragment series. Which is recommended to do if you are new to Android, Kotlin or Android Fragments.