Skip to content

[Bug] App stops running in background when data access is blocked/turned off #436

@wrn491

Description

@wrn491

Body
Describe the bug
Forkgram normally stays running in the background for many hours (even when the phone is idle). However, as soon as data access (mobile data or Wi-Fi) is blocked or restricted for the app, the background process stops completely and the app no longer runs in the background.

To Reproduce

Install latest Forkgram from F-Droid (or GitHub).
Open the app, log in, and let it run.
Switch to home screen or another app — Forkgram continues running in background for hours.
Block data access for Forkgram using one of the following methods:
Use a firewall app (e.g. NetGuard, AFWall+) to block internet for org.forkgram.messenger, OR
Go to Android Settings → Apps → Forkgram → Data usage → Restrict background data / mobile data, OR
Simply turn off mobile data or Wi-Fi while the app is in background.

After a short time, check recent apps / running services / battery usage — Forkgram is no longer running in the background.

Expected behavior
The app should either:

continue running in the background in offline/no-data mode, or
handle the lack of network gracefully without killing the background service.

Actual behavior
Background service stops immediately or within a few minutes when data is blocked.
Environment

Forkgram version: 12.6.5.0
Android version: 16 (lineagos)
Device model: (realme 10 pro)
Is battery optimization disabled for Forkgram? (No)
Method used to block data: ( Android settings)

*Additional context
This happens every time. Without any data restriction the app stays alive for many hours as expected. No crash log is shown; the process simply disappears from background.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions