An Android Auto app that displays synced lyrics for the currently playing song, powered by LRCLIB.
- Synced lyrics on Android Auto — shows the current lyric line with surrounding context, updated in real-time
- Works with any music player — Spotify, YouTube Music, Apple Music, Poweramp, etc.
- Phone companion view — see lyrics on your phone screen too
- Automatic song detection — picks up whatever is playing via media session APIs
- Multi-strategy lyrics lookup — tries exact match first, falls back to keyword search
MediaListenerService (NotificationListenerService)
│
▼
MediaTracker (singleton, StateFlow)
│ ├── detects song changes → LrcLibClient → LrcParser
│ └── tracks playback position → updates current lyric index
│
├─────────────────┐
▼ ▼
LyricsScreen MainActivity
(Android Auto) (Phone UI)
- Android Studio Hedgehog (2023.1.1) or newer
- Android SDK 34
- JDK 17
- A physical Android device (Android 8.0+)
- Open the project in Android Studio
- Sync Gradle
- Build and install on your device:
./gradlew installDebug
- Open Auto Lyrics on your phone
- Grant notification access — tap the button and enable "Auto Lyrics" in the system settings
- Play a song in any music app
- Lyrics will appear both on the phone and on Android Auto
- Install Android Auto Desktop Head Unit emulator from SDK Manager → SDK Tools
- Enable Developer mode in the Android Auto app on your phone (tap version 10 times)
- In Android Auto developer settings, enable Unknown sources
- Start the DHU:
cd $ANDROID_SDK/extras/google/auto/ ./desktop-head-unit - Connect your phone via USB with the Android Auto companion app running
- Auto Lyrics will appear in the app launcher on the DHU
Since this app is installed outside the Play Store, Android Auto requires developer mode to show it:
- Open the Android Auto app on your phone
- Go to Settings → scroll to the bottom → tap Version 10 times rapidly
- You'll see a toast saying "Developer mode enabled"
- Tap the ⋮ (three-dot) menu at the top right → Developer settings
- Enable "Unknown sources" (allows sideloaded apps on Android Auto)
- Restart Android Auto or disconnect/reconnect to your car
- Auto Lyrics should now appear in the Android Auto app launcher
- Play music — lyrics appear automatically
- Media detection: A
NotificationListenerServicegrants access toMediaSessionManager, which provides the currently active media controllers - Song identification: When the song changes, metadata (title, artist, album, duration) is extracted from the
MediaController - Lyrics fetch: The app queries LRCLIB — first an exact match (
/api/get), then a keyword search (/api/search) as fallback - LRC parsing: Synced lyrics in
[mm:ss.xx] textformat are parsed into timestamped lines - Position tracking: Playback position is calculated from the media session's last reported position + elapsed time, checked every 150ms
- Display: On Android Auto, a
PaneTemplateshows 4 lyric lines centered on the current one, marked with ▶. The screen refreshes only when the active line changes.
- Android Auto app categories: The app registers as an IOT-category Car App. For Google Play distribution, it would need to pass Android Auto app review.
- Lyrics availability: Not all songs have synced lyrics on LRCLIB. The app will show "No synced lyrics available" for missing tracks.
- Player compatibility: Most major music players expose media sessions correctly. Some niche players may not provide full metadata.
- Streaming quality tags: Some music apps (YouTube Music, Tidal, etc.) inject quality info like "Lossless" or "Hi-Res" into metadata fields. The app strips these automatically, but unusual formats may slip through.
- Sideloaded apps on Android Auto: Developer mode must be enabled in Android Auto settings to see sideloaded apps. See setup instructions above.
MIT