Premium floating media volume controller for Android, built in Kotlin.
AccessButtons provides a glass-style overlay with + / - controls for STREAM_MUSIC, designed for MIUI/Xiaomi reliability using a foreground service architecture.
- Floating glassmorphic overlay for quick volume control
- Vertical controls:
- Top:
+volume - Bottom:
-volume
- Top:
- Smooth drag + snap-to-edge behavior
- Haptic click feedback on every press
- Foreground service with persistent notification
- Permission manager flow for:
- Display over other apps
- MIUI Autostart (Xiaomi/Redmi)
- Battery optimization whitelist
- Mode-ready service architecture:
SYSTEM_UI(shows Android system volume slider)CUSTOM(reserved for future in-app slider)
- Kotlin (1.9+ compatible; currently Kotlin 2.x in project)
- Android SDK (targeting modern Android; tested use case includes Android 11 MIUI 12.5)
- Jetpack Compose (app screen)
- Android Foreground Service + WindowManager overlay
- Kotlin Coroutines
app/src/main/java/com/example/accessbuttons/MainActivity.kt: permission manager and service control UIapp/src/main/java/com/example/accessbuttons/VolumeService.kt: overlay engine, drag/snap logic, haptics, volume actionsapp/src/main/res/layout/floating_layout.xml: floating UI definitionAGENTS.md: engineering operating manualCODEX.md: project memory, troubleshooting, roadmap
- Android Studio (latest stable recommended)
- Android SDK / Build tools installed
- A real device for overlay behavior validation (recommended)
- Clone the repository.
- Open in Android Studio.
- Build and install:
- Windows:
./gradlew.bat installDebug - macOS/Linux:
./gradlew installDebug
- Windows:
- Launch app and grant required permissions.
- Start the floating controller from the app screen.
Display over other apps(overlay)- Notification permission (Android 13+)
- Battery optimization whitelist (recommended for MIUI)
- Xiaomi/Redmi Autostart (recommended for persistence)
./gradlew.bat lint./gradlew.bat test./gradlew.bat clean assembleDebug./gradlew.bat connectedDebugAndroidTest(for UI/integration behavior changes)
- Overlay not showing:
- Confirm overlay permission is enabled
- Restart service from app
- Service killed in background:
- Enable MIUI Autostart
- Set battery mode to No restrictions
- Ensure persistent notification remains visible
- Add custom in-overlay volume slider mode
- Persist mode and UI settings with DataStore
- Add expanded panel (mute/presets/theme)
- Add stronger instrumentation test coverage
Contributions are welcome.
Before opening a PR:
- Run verification commands.
- Ensure no secrets or local machine files are included.
- Update docs (
README.md,AGENTS.md,CODEX.md) when behavior or architecture changes.
Do not commit credentials, signing keys, or environment secrets.
If you find a security issue, open a private report to the maintainer before public disclosure.
This project is licensed under the MIT License. See LICENSE.