Notifications make Shuttle start playing (sometimes)
Shuttle version:
v2.0.8-beta4 (upgraded)
Device, OS:
Moto G4 Plus Android 7.0
Description of bug: When Shuttle is paused, and a notification such as a text message or phone call comes in, Shuttle will sometimes start playing. (Shuttle can also start playing by itself when another sound-playing app is exited.)
Steps to reproduce:
- Play and pause a track in Shuttle.
- Receive a notification
- Be unlucky, I guess (I haven't managed to regularly reproduce this. It doesn't seem to happen every time, and I don't have a reliable way of generating notifications)
Expected outcome:
Shuttle doesn't start playing
Observations/Actual Result:
Sometimes it does start playing.
Facing the same issue, Happens after the notification is created the first time, works fine after that.
Tried understanding the code for a few hours, finally added following lines to LocalPlayback.kt line no: 89 worked for me.
if (!isPlaying) {
currentAudioFocusState = AudioFocus.NO_FOCUS_NO_DUCK
}
I have this problem as well. For me, it's the "shuttle service" thing in the notifications. When it pops up, the player sometimes starts to play a random song (out loud!!!)