Skip to content

Bug: "Now Playing" state is lost if app is closed while playing (persists if paused) #1780

@Karmander01

Description

@Karmander01

Bug Report

  • Short summary: The "Now Playing" mini-player disappears on a cold start if the app is swiped away from recent apps while audio is actively playing. However, if the track is paused before closing the app, the state is successfully saved and the mini-player appears as expected upon reopening.
  • Expected behavior: The app should save the current playback state (track, queue, and timestamp) when the app is killed from the recents menu, regardless of whether the audio was actively playing or paused at the time of closing.
  • Actual behavior: Playback state is only saved upon a manual pause. Killing the app while music is actively playing bypasses the state-saving logic, resulting in a complete loss of the playback session on the next launch.
  • Steps to reproduce: 1. Open the app, start playing a track, and leave it playing.
    2. Open the Android recent apps menu and swipe the app away to close it completely.
    3. Reopen the app. Notice the "Now Playing" tab is missing (See Video 1).
    4. Play a track again, but this time pause the audio.
    5. Swipe the app away from recents and reopen it. Notice the tab now persists correctly (See Video 2).
  • How often does it happen? Always
  • Screenshot / video: - Video 1: Demonstrates closing the app while playing (shows the bug/missing tab).
v1.mp4
  • Video 2: Demonstrates closing the app after pausing (shows the expected, working state).
v2.mp4
  • Logs / stack trace: N/A

Environment

  • PixelPlayer version: v0.6.0
  • Install source: GitHub Release
  • Android version: Android 16
  • Device model: Nothing Phone (2a)
  • Extra context: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions