Build a Hands-Free Selfie Android Application with MediaPipe
Introduction
Set up the Development Environment
Manage Camera Permissions
Integrate MediaPipe solutions
Manage UI state with ViewModel
Use SharedFlow to View Events
Use StateFlow to View Controller States
Mediate flows to trigger photo capture
Avoid duplicate photo capture requests
Next Steps
Build a Hands-Free Selfie Android Application with MediaPipe
Who is this for?
This is an introductory topic for mobile application developers interested in learning how to build an Android selfie application with Modern MediaPipe Multimodal AI, Kotlin flows, and CameraX, using the Modern Android Development (MAD) architecture design.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Architect a modern hands-free selfie Android app with MediaPipe.
- Leverage lifecycle-aware components within the Model-View-ViewModel (MVVM) architecture.
- Combine MediaPipe's face landmark detection and gesture recognition for integration in a multimodel selfie solution.
- Use JetPack CameraX to access camera features.
- Use Kotlin Flow APIs to handle multiple asynchronous data streams.
Prerequisites
Before starting, you will need the following:
- A development machine with Android Studio installed.
- A recent Arm-powered Android phone with a front-facing camera and a USB data cable.
- Familiarity with Android development concepts.
- Basic knowledge of Modern Android Architecture. See Modern Android App Architecture .
- Basic knowledge of Kotlin programming language, including Coroutines and Kotlin Flows .