This is the first episode of a new Kotlin camera2 API series. Which follows on from the Kotlin camera2 preview series.
The Kotlin Camera2 API Video Icons Android development tutorial describes how to add image icons to an Android Fragment.
After adding the image icons to the Android ConstraintLayout file, on click listeners will be implemented for each image icon in the Kotlin fragment preview file.
An Android Chronometer view will also be added to the Android ConstraintLayout. The Android Chronometer will be used to display the video record capture time.
In this Kotlin on Android tutorial we will cover:
- How to add icons using Android Studio
- Adding an Android ConstraintLayout to a Fragment layout
- Inserting icons into an Android ConstraintLayout
- Adding an Android Chronometer
- Adding on click listeners to Android ImageViews
- Rear Camera Record
- Round preview thumbnail
- Sharing Uri with ViewModel
- Video Playback with ExoPlayer
- Video PIP
- Front Camera Record (Premium)
- Video Record with Audio (Premium)
- Replace TextureView with SurfaceView (Premium)
Disclaimer, it is recommended to follow this Kotlin on Android tutorial series using a Google Pixel or Nexus device.
Please do not try it with the Android Emulator. Bugs have also been observed in camera stacks of none Google devices, which may be exposed by this tutorial series.
In this Kotlin on Android tutorial series, we described how to add image icons to an Android ConstraintLayout using the Android Studio GUI tool.
Once the ImageView’s had been inserted and their constraints added, on click listeners were implemented in the Android fragment file.
An Android Chronometer view was also added to display the record capture time to the user.
The next Kotlin on Android camera2 episode will describe how to set up the MediaRecorder.