Keeping the android app running in the background

Seems that I can never get a reliable upload service on my phone - invariably always need to open the app to get it to upload photos, on the latest version as well as the older versions.

I have the turn on background uploads toggled on and the seafile monitoring service is displayed in notifications for a while, but later in the day or the next day it is gone…

any clues as to what’s going on - its a motorola edge 50 pro if it helps? I presume Android is killing it…

I should add I have…

All permissions on

Manage App if Unused turned off

Allow Background Usage turned on

and I believe there was one more power management function that allowed but I don’t recall what that was and can’t find it just now,

This behavior is usually related to how Android (and specifically Motorola’s version of it) manages background processes to save battery. Here are a few things to check and consider:

1. Battery Optimization (Crucial)

Android often “optimizes” apps by killing their background services. On your Motorola Edge 50 Pro:

  • Go to Settings > Apps > See all apps > Seafile.
  • Look for Battery or App battery usage.
  • Ensure it is set to Unrestricted (or “Unlimited”). If it is set to “Optimized,” the OS will likely kill the background service once the phone is idle.

2. Android 14+ Foreground Service Timeout

If your phone is running Android 14 or later, Google introduced a “Foreground Service (FGS) Timeout.” Even with a persistent notification, the system may stop a background service after about 6 hours of inactivity. The timer resets whenever you open the app. This is a platform limitation that affects many sync apps.

3. Persistent Notification

Seafile uses a “FileDaemonService” to monitor and upload files. When this is active, you should see a persistent Seafile notification.

  • If that notification disappears, it means the Android OS has killed the service.
  • Make sure you haven’t manually dismissed or blocked notifications for Seafile, as this can sometimes impact the service’s priority.

4. Motorola-Specific Settings

Some Motorola devices have “Adaptive Battery” or “Battery Saver” modes that are very aggressive. Ensure these are disabled or that Seafile is excluded from them.

For more technical details on how the app handles background tasks, you can refer to the discussion on the official Seadroid GitHub repository: GitHub Issue #1090.

If you’ve already set the app to “Unrestricted” and it still stops, it may be helpful to know your Android version to see if the 6-hour timeout applies to you.

thanks for the info daniel - i do feel like its this FGS Timeout that might be the culprit

  1. App battery usage - mine has an Allow background usage toggle that is turned on
  2. seems consistent with what i’m seeing, it’s been running for four hours - i’ll double check it in another 2 and see where its at.
  3. Usually my first clue that its killed it is the notification disappearing
  4. Have both of those and are already set to off

Android version is 16

Cheers

So just checking again now, i see the notification is gone and seafile has stopped uploading anything…

So I guess it must be the Foreground Service Timeout forcing it shut, anyway to disable that?

Unfortunately, the “Foreground Service (FGS) Timeout” is a platform-level restriction introduced by Google starting with Android 14, and there is no setting within the app or the Android OS to disable it.

As mentioned in the technical discussion on the Seadroid GitHub repository, this mechanism is designed to limit foreground services to approximately 6 hours of inactivity. This is a system-level policy that affects all sync and background apps.

The only way to currently bypass this is to bring the app to the foreground (open it), which resets the 6-hour timer.