android auto bug
Small little bug i have found on android auto. If you search for song or artist and scoll and pick a song in thay search list it wont play that song you just clicked on, it will play other song wired.
Please update to v2.2.0 and check if it still happens. If it does, tell me your app version, phone model, Android version and Android Auto version, and send a screen recording of the car screen showing the search and the song it plays instead.
Automatic reply — the maintainer may follow up.
This is the same in version 2.2.0, the phone is Samsung Galaxy s25 ultra.
Android version 16, OneUI 8.5.
Android Auto version 17.7.663654-release
I confirm, the issue is still there in v2.2.0
It happens to me too, on 2.5.0 (Galaxy S23, Android 16).
Cause (confirmed on device, logs in #2821): search results are only kept in searchTempList and never saved to the database, but when you tap one, onSetMediaItems in SimpleMediaSessionCallback.kt looks the song up in the database only:
SONG -> {
val songId = path.getOrNull(1) ?: return@future defaultResult
val firstQueue = songRepository.getSongById(songId).first()?.toTrack() ?: return@future defaultResult
So a song you've never played is never loaded. Android Auto then resumes the saved queue, so another song plays, or shows "Could not load your selection" if there is none. A song you've played before works fine, so playing it once from the phone is a workaround.
Tentative fix: fall back to the search results, then to an online lookup (as onGetItem already does), and save the song like the Home branch does:
val firstQueue =
songRepository.getSongById(songId).first()?.toTrack()
?: searchTempList.firstOrNull { it.videoId == songId }
?: streamRepository.getFullMetadata(songId).lastOrNull()?.data
?: return@future defaultResult
songRepository.insertSong(firstQueue.toSongEntity()).first()
Separately, music in Android Auto also stops every few minutes for me. That's tracked in #2428 if it happens to you too.
Fix for this: maxrave-dev/core#56. Tested in the Android Auto emulator: tapping a song never played before now plays it. On builds with cast, this bug crashed the app instead of playing the wrong song.
Version 2.6.0 Android 17 Motorola Signature, Android Auto Version 18.0.664264-release. Der Fehler ist noch vorhanden.
Thanks for checking, @bbkmanu. The fix isn't in 2.6.0 yet: maxrave fixed it in core 7347ee44, so it should come with the next release.
Fixed in 2.7.0 (184298e0, maxrave-dev/core@7347ee4): tapping a song in Android Auto search results plays that song, including songs never played in the app before.