Android Auto media control proxy that forwards car media buttons to the active Android media session.
- Java 100%
|
|
||
|---|---|---|
| app | ||
| gradle/wrapper | ||
| .gitignore | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle | ||
Universal Media Control for Android Auto
An Android Auto media-app proxy that exposes a simple media session to the car and forwards Play/Pause/Next/Previous to the currently active Android media session.
The intended use case is media that already reacts to generic media controls on the phone or watch, but does not appear as a native Android Auto media app, such as YouTube background playback or browser-based players.
How it works
- Android Auto sees this app as a media app through a
MediaBrowserService. - The service keeps a small proxy
MediaSession. - Media commands are forwarded to the best active external media session.
- If no active session is available through notification access, the app falls back to dispatching a generic media key event.
Setup on the phone
- Install the APK.
- Open Universal Media Control once.
- Grant notification access when prompted.
- In Android Auto, select Universal Media Control as the media app.
- Use the car's Play/Pause/Next/Previous buttons.
Notification access is needed so the app can discover and target the real active media session instead of accidentally controlling its own proxy session.
Build
ANDROID_HOME="$HOME/Android/Sdk" ./gradlew assembleDebug