Skip to content
YA
All work
PrototypeAndroidAI

Kaffكفّ

Grab a file with your fist, open your palm at the other phone — and it moves. Offline.

Status
Six development phases complete; first field-testing round done on real phones.
Period
2026
Platforms
Android
Repository
Private — available on request
Live
—
Kكفّ

Kaff

  • CameraX
  • MediaPipe HandLandmarker
  • GestureEngine
  • Send VM
  • Receive VM
  • Fist → grab
  • Palm 700 ms → accept
  • SendController + reducer
  • ReceiveController + reducer
  • Nearby BYTES + FILE
  • MediaStore
  • SHA-256 verify
  • Room history

01Overview

On-device hand tracking recognizes a fist to pick up a file and an open palm, held for 0.7 s, to accept it. Files travel peer-to-peer over Google Nearby Connections (Bluetooth bootstrap, then Wi-Fi Direct), behind a 4-digit pairing code, and every file is verified with SHA-256 before it is saved.

By the numbers

measured, 500 MB over Nearby
12.5 MB/s
measured, 500 MB over Nearby
docs/DECISIONS.md
JVM tests
104
JVM tests
README
Kotlin files
113
Kotlin files
source tree
  1. 02The problem

    Sending a file between two phones next to each other still means apps, accounts, cables or the internet. The gesture should be as physical as handing something over.

  2. 03The solution

    MediaPipe HandLandmarker (GPU with CPU fallback) feeds a gesture engine; transfer logic is a pair of pure send/receive state machines over Nearby BYTES + FILE payloads, and MediaStore saving with integrity checks.

04Key features

  1. 01

    Pairing before anything moves

    Both phones show the same 4 digits; nothing is accepted until the receiver confirms. The gesture is a trigger, not an identity check.

  2. 02

    Integrity

    SHA-256 and size verified while saving; corrupted files never appear in the gallery. Up to 20 files per transfer.

  3. 03

    Power aware

    Camera auto-timeout, ~15 fps on battery saver, paused when the phone is hot.

  4. 04

    Gesture Lab

    Live skeleton, raw and confirmed gesture, scores, handedness, palm facing and FPS — for tuning sensitivity on any device.

05Screens

No screenshots exist for this project yet, so it is presented through its architecture rather than invented screens.

06System architecture

  1. L1Perception
    • CameraX
    • MediaPipe HandLandmarker
    • GestureEngine
  2. L2Flow
    • Send VM
    • Receive VM
    • Fist → grab
    • Palm 700 ms → accept
  3. L3Transfer
    • SendController + reducer
    • ReceiveController + reducer
    • Nearby BYTES + FILE
  4. L4Storage
    • MediaStore
    • SHA-256 verify
    • Room history
Camera → tracker → gesture engine → send/receive view models → pure controllers + reducers ↔ Nearby → MediaStore with SHA-256.Diagram — derived from the source code

07Technical challenges

  1. The palm worked in the lab, not on a real phone

    Field testing on an OPPO Reno13 F (Android 16) found three causes: a 1–1.5 s camera cold start inside a 5 s window, 'this time only' camera grants silently expiring on ColorOS, and a palm-facing check rejecting angled hands. The receiver now warms the camera as soon as a sender pairs, the window is 7 s, and the palm-facing check is off by default.

08Lessons learned

Measure on the worst phone you can find; it sets the ceiling.

My contribution

Design, gesture engine, transfer protocol and field testing — 15 commits.

Technology

  • Kotlin
  • Jetpack Compose
  • Material 3
  • CameraX
  • MediaPipe
  • Nearby Connections
  • Hilt
  • Room
  • DataStore
  • Coroutines
  • Flow
  • kotlinx.serialization
  • MockK
  • Turbine
  • Computer Vision

How this was verified

Source, README, protocol and decision log reviewed, including field-test notes and speed measurements. Screenshots are still placeholders in the project, so none are shown.

Related projects

Next project

SUBZERO