Jami not receiving messages in background
- Jami version: Eleutheria - 20231228-01
- Device model: Google Pixel 5
- Android version: 14
- What build you are using: F-droid
Steps to reproduce
- Can you reproduce the bug: at will
- Steps:
- Set battery optimization option for Jami to unrestricted (which disables battery optimization)
- Turn on "Run in background"
- Use another client to call and message this client to make sure it can receive calls and messages
- Move this client to background by swiping left
- Wait 10 seconds
- Use another client to call and message this client
- Actual result: No calls or messages are received
- Expected result: Calls and messages are received
Additional information
Messages are received after opening this client (moving to foreground).
Jami website states that ... using a permanent notification, to prevent the application from being killed (this is what the "Run in background" option in Jami has done). There is no "permanent notification" or any notification after turning on "Run in background".
When I developed an Android app that needs to run in the background, I had to use setForegroundAsync
to keep it alive, calling this function also creates a notification. Maybe that's what Jami needs? Code example can be found here https://developer.android.com/develop/background-work/background-tasks/persistent/how-to/long-running
Edited by -