Always-On Display with gesture-based wake for Android
A lightweight Always-On Display (AOD) app built with Jetpack Compose that shows the clock, notifications, media controls and charging info over the lock screen — and wakes when you lift, shake or wave at your phone.
- Clean, customizable AOD screen with clock, date and battery info
- Multiple clock styles, fonts and sizes
- 12 / 24 hour format toggle
- Shows notifications, media info, charging speed and more
- Lift to Wake — pick up the phone to show the AOD
- Shake to Wake — shake the device with adjustable sensitivity
- Wave to Wake — wave your hand over the proximity sensor
- Pocket Detection — locks the phone when it's in your pocket, wakes it when you take it out
- Play / pause / skip controls on the AOD
- Volume slider with long-press swipe gesture
- Adjustable volume swipe steps for one-handed fine-tuning
- Per-feature toggles and sensitivity sliders
- Ambient display toggles for notifications, media, charging and call info
- Battery-optimized always-on operation
The app uses an Accessibility Service to draw an AOD overlay on top of the lock screen, plus sensors to detect wake gestures:
| Gesture | Sensor | Detection |
|---|---|---|
| Lift | Accelerometer | Total acceleration magnitude (~9.8 m/s² at rest) deviating from gravity after a confirmed rest period |
| Shake | Accelerometer | Rapid magnitude oscillations (rest→move waves) above a sensitivity threshold |
| Wave | Proximity | Brief sensor cover (30–500 ms) |
| Proximity | Sustained sensor cover (≥800 ms) |
The screen timeout turns the display off naturally, and the next SCREEN_OFF cycle restarts the AOD.
- Kotlin + Jetpack Compose (Material 3)
- Accessibility Service — AOD overlay rendering
- Notification Listener Service — notification data for the AOD
- Foreground Service — keeps the app alive for gesture sensing
- Navigation Compose, Lottie, Shizuku, Material Icons Extended
- Android 10 (API 29) or higher
- A device with an accelerometer and proximity sensor
./gradlew assembleReleaseOn first launch, grant the following:
- Accessibility Service — required to show the AOD overlay and lock the screen
- Notification Access — required to show notifications on the AOD
- Overlay permission (draw over other apps)
- Ignore battery optimizations — so gestures keep working while the screen is off
- Notifications — for the foreground service notification
- Install and open the app
- Grant all required permissions (the onboarding flow guides you)
- Enable the features you want (Lift, Wave, Shake, Pocket Detection, Ambient Display)
- Turn off the screen — the AOD will appear
- Lift, shake or wave to wake it!
app/src/main/java/com/hktamizhan/hkaod/
├── MainActivity.kt # Settings UI & onboarding
├── SplashActivity.kt # App launcher splash
├── AODService.kt # Accessibility service, sensors, overlay & wake logic
├── AODScreen.kt # AOD overlay UI (clock, notifications, media controls)
├── AODActivity.kt # Full-screen AOD activity (alternative view)
└── AODKeepAliveService.kt # Foreground service to keep sensing alive
- Wake gestures are disabled while a call is in progress
- AOD overlays require an unlocked bootloader-free device with standard Android permissions
- Battery life depends on which features are enabled — enabling more gestures uses more sensor power
This project is for personal/educational use. See the source files for details.
Made with ❤️ by HK Tamizhan