Skip to content

**Bug: Background playback stops after ~10 minutes on Android 14/15 (Pixel 9a)** #24

@tbodo-png

Description

@tbodo-png

Hi! I'm not a coder, I just really, really love WXYC and have had trouble with this app for months. I've tried a bunch of fixes and reached out to the developers, and finally had Claude analyze the code. Here's it's report:

The app consistently stops playing after approximately 10 minutes when the screen is off. The media player disappears from the lock screen. This occurs on both WiFi and mobile data. Reinstalling the app and adjusting per-app battery optimization settings do not resolve the issue. Other streaming apps (Spotify, etc.) are unaffected.

Device: Google Pixel 9a
Android version: Android 15
App version: Latest from Play Store

Possible contributing factor (flagged with help from an outside source — I am not an Android developer):

In AudioPlaybackService.kt, a NotificationChannel is created in onCreate(), but no DefaultMediaNotificationProvider appears to be explicitly bound to the MediaSessionService. It's possible that without this binding, the service may not reliably promote itself to a foreground service when the screen turns off. Android 14+ can terminate background services without an active foreground notification after a short timeout, which could explain the consistent ~10 minute cutoff on Pixel devices.

A possible fix might be to add the following in onCreate(), before initializePlayer():

setMediaNotificationProvider(
    DefaultMediaNotificationProvider.Builder(this)
        .setChannelId("AudioPlaybackChannel")
        .setNotificationId(1001)
        .build()
)

And to change the notification channel importance from IMPORTANCE_DEFAULT to IMPORTANCE_LOW:

val channel = NotificationChannel(
    channelId,
    "WXYC Stream",
    NotificationManager.IMPORTANCE_LOW
)

I recognize I may be missing context from other parts of the codebase, and defer to your judgment on whether this is the actual cause. I'm primarily reporting the symptom in hopes it's useful, as I've been experiencing this consistently for several months across reinstalls and phone restarts.

Thank you for maintaining the app!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions