This sample demonstrates the MediaPipe Hand Landmarker task in a Jetpack Compose Material 3 app. It detects 21 3D hand-knuckle coordinates and handedness (Left / Right) across:
- Camera: Live front/back CameraX feed with real-time landmark skeleton overlays and inference latency telemetry.
- Gallery: Bundled sample photo (
Try sample) as well as user-selected images and videos from the device gallery.
In the Settings sheet, you can switch the hardware Delegate (CPU or GPU), change Max hands (1 or 2), and tune detection, tracking, and presence confidence thresholds.
- Android Studio (with Android SDK 36 and JDK 17+)
- An Android device or emulator running Android 9.0 (API 28) or higher
The Gradle script app/download_tasks.gradle.kts automatically downloads and SHA-256 verifies hand_landmarker.task into app/src/main/assets/ before building:
./gradlew :app:verifyModels :app:assembleDebugTo run the shared unit tests and instrumented real-model + UI tests:
./gradlew :android-common:testing:testDebugUnitTest :app:connectedDebugAndroidTest