SimpMusic icon indicating copy to clipboard operation
SimpMusic copied to clipboard

android auto bug

Open bensmithgb53 opened this issue 3 months ago • 8 comments

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.

bensmithgb53 avatar Sep 01 '26 19:09 bensmithgb53

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.

simpmusic-support[bot] avatar Oct 06 '26 16:10 simpmusic-support[bot]

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

StoyanBorisovBG avatar Oct 09 '26 06:10 StoyanBorisovBG

I confirm, the issue is still there in v2.2.0

MohammedNoureldin avatar Oct 28 '26 17:10 MohammedNoureldin

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.

Dollarius avatar Nov 04 '26 09:11 Dollarius

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.

Dollarius avatar Nov 08 '26 12:11 Dollarius

Version 2.6.0 Android 17 Motorola Signature, Android Auto Version 18.0.664264-release. Der Fehler ist noch vorhanden.

bbkmanu avatar Nov 24 '26 07:11 bbkmanu

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.

Dollarius avatar Nov 25 '26 14:11 Dollarius

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.

maxrave-dev avatar Nov 26 '26 07:11 maxrave-dev