-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closing Element closes background services #1737
Comments
This comment has been minimized.
This comment has been minimized.
I don't think it's necessary to enable the notification to have it running. But you have to enable 'Enable notification for this session' Regarding the 'running service', element will periodically start a sync as a foreground service; That means that periodically you will see a 'listening for event' notif, and depending on your sync size it might be fast. So it's permanenlty checking periodically |
This comment has been minimized.
This comment has been minimized.
Oh, nevermind, it's broken again, even with "Listening for events" turned on. Sync just never appears again after the app was closed through "Recent apps" menu. I'm unable to find out what causes this problem. Could this be related to presence/updating of Google Services or turning off/on VPN on the system? |
If you used the 'force stop' option in running apps, some android version will block it from running in background until you explicitly relaunch it |
I have a "close everything" button in "recent apps" menu, pushing it while Element is in the list almost always stops sync from appearing. The thing is: sometimes it doesn't stop it and sometimes syncs die with Element still in the list. |
Having the same problem, also with F-Droid version. I only get notifications when Element listens ('listening for event' notif). |
FDroid version does not give me any background con either on /e/ OS - FP3. |
Same issue with F-Droid version on Android 9. It might be worth investigating how other apps do this. I know F-Droid version of Tutanota has a similar use case. For that app I periodically see a brief notification while it checks for mail. While that app still has some issues, that app has less problems than element, which at least for me very consistently closes when not in foreground. An advantage of that brief notification is that if it fails to appear, it reminds me that the app is not running. IIRC that notification is an option I can turn off if I don't like it. Syncthing has a different use case, but is delivered through F-Droid and is rock-solid for me. I believe its secret sauce is a persistent notification. |
My current understanding of this issue is that Element schedules synchronisation using a Worker or an Alarm, has a notification active while actually syncing, then schedules the next synchronisation. But if the system declines to run your worker, there's no mechanism for restarting. I've had a play about with trying to add one (in #2921) but I'm not entirely clear that's the direction to go in. Also, we currently run the |
I also have the same problem, and have had as long as I can remember running Element. I'm on LineageOS/MircroG with no google services so rely on the Fdroid versions' polling mechanism. In it's current state Element on Android isn't usable as a real-time messaging application for me which is a shame as I would really like it to see wide adoption! Has the PR is #2921 been tested? I'm not experienced enough to build myself but would happily test if someone can build that version? Has anyone found a workaround to reliably restart Element in the background, perhaps using Tasker or similar? This is something I have considered trying to mess with. but fixing the issue at source always seemed like the better option. |
Gotify Android (https://github.com/gotify/android), the self-hosted notification system, uses a websocket connection with its server + recommends disabling battery optimizations + utilizes a foreground notification for keepalive. In my experience, it uses minuscule battery over the day, doesn't even show up on the battery stats page in Settings. However, I always receive every notification instantaneously. Two takeaways:
|
Addressed by #4298, is in 1.3.7 |
Hello,
I'm using Android 10 with Element from F-Droid store. When I'm closing the app from "Recent apps" menu, this also stops any background activity, such as listening for events.
This was not the case for Android 8 + RiotX.
Also, for example, Telegram FOSS (which also has custom push notifications mechanism and not firebase) doesn't cancel event listening in this case.
Also Element does not appear in
Developer options -> Running services
unlike mentioned Telegram FOSS.The text was updated successfully, but these errors were encountered: