Skip to content

Feature request: Persistent Background Sync Service (Keep connection alive when swiped away/closed from recent apps list) #3096

@nia-the-cat

Description

@nia-the-cat

Use Cases

I use Grayjay's sync feature across two devices: a Google Pixel 9 Pro XL running Android 16 (Stock) with Grayjay v372, paired with a secondary device also running Grayjay. The goal is to keep watch history, subscriptions, and other data seamlessly synchronized between them in the background.

Currently, swiping Grayjay away from the Android Recents screen, or clearing all recent apps, kills the sync connection even when the Android battery permission is explicitly set to Unrestricted. Device 2 instantly shows the connection as Offline. Many users habitually hit "Clear All" in their Recents menu to free memory or clutter. This result also exists in a device fresh boot scenario where Grayjay has not been opened yet.

For example: a user watches content and subscribes to channels via Grayjay on their tablet or PC at home, while their phone's Grayjay has been cleared from Recents or otherwise has "not been opened yet". They then turn off the tablet or PC and leave the house with just their phone. The phone's Grayjay never received those updates during the window where both devices were online and in the ideal syncing scenario, so those changes will not appear on the phone until the user gets back home and lets sync catch up by ensuring both apps are open or otherwise not closed/cleared from recents.

A persistent background service would allow that sync window to be used as intended, avoiding the need for the user to think about app state at all.

Proposal

Adding an optional setting that allows Grayjay to keep its sync connection alive in the background, even when cleared from Recents, would address this. The setting could be opt-in to respect users who do not want any background activity at all. This could be implemented via a persistent notification as many apps do, or another method. Users who do not want to see this keepalive notification additionally are able to "minimize" and "silence" it via Android notification settings.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions