element-x-ada/libraries
Jorge Martin Espinosa 8e46e68630
Add a foreground service with a wakelock for fetching push notifications (#6321)
* Create `PushHandlingWakeLock` to start a foreground service:

When receiving a push and scheduling the notification fetching, several problems can happen:

1. Some async operation is waiting for a timeout and it takes way longer than that to finish (i.e. timeout of 10s but it took 30s to advance).
2. The same, but when starting new coroutines. I've seen the time between scheduling a coroutine and it running sometimes take up to 1 minute.
3. Notification fetching can be scheduled immediately, but it can take a while to actually run because the OS understands the app is now in Doze.

Having a wakelock that runs as soon as the push handling starts fixes these: it continues the previous wakelock held by either Firebase or the UnifiedPush distributor.

* Acquire the wakelock as soon as we received the pushes in both receivers

* Also release the wakelock ahead of time if possible
2026-03-17 14:24:26 +01:00
..
accountselect Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
androidutils Sync Strings from Localazy 2026-03-16 00:42:32 +00:00
architecture Add code to help debugging the saved nav state graph (#6295) 2026-03-06 14:44:30 +00:00
audio set willPausedWhenDucked to true for RecordVoiceMessage 2026-02-12 19:50:11 +01:00
compound Update screenshots 2026-03-02 12:19:18 +00:00
core Improve Kover setup by using only convention plugins (#6213) 2026-03-16 14:41:07 +00:00
cryptography Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
dateformatter Sync Strings from Localazy (#5904) 2025-12-15 23:51:19 +01:00
deeplink Use the raw expected string for DefaultDeepLinkCreatorTest cases 2025-12-10 15:58:41 +01:00
designsystem Remove ComposerAlertLevel.Default (not in the design). 2026-03-02 13:56:08 +01:00
di Improve Kover setup by using only convention plugins (#6213) 2026-03-16 14:41:07 +00:00
encrypted-db Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
eventformatter Sync Strings from Localazy 2026-03-16 00:42:32 +00:00
featureflag Add network constraints for fetching notifications with WorkManager (#6305) 2026-03-10 12:44:31 +00:00
fullscreenintent Detekt: enable rule exceptions.SwallowedException and fix existing issue. 2025-12-05 09:45:23 +01:00
indicator Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
maplibre-compose Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
matrix Call the new recoverAndFixBackup method to fix key storage if it's broken 2026-03-10 14:49:34 +00:00
matrixmedia Apply suggestion: 2026-02-27 09:52:17 +01:00
matrixui Sync Strings from Localazy 2026-03-16 00:42:32 +00:00
mediapickers API modules do not need to setup dependency injection. 2025-11-12 19:05:39 +01:00
mediaplayer Merge branch 'develop' into feat/variable-playback-speed 2025-12-30 21:29:18 +01:00
mediaupload Remove all video metadata (#6224) 2026-02-18 16:51:44 +00:00
mediaviewer Sync Strings from Localazy 2026-03-16 00:42:32 +00:00
network Enable logging OkHttp traffic based on the current log level (#5750) 2025-11-18 15:18:27 +01:00
oidc Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
permissions Update metro to v0.11.2 (#6270) 2026-03-03 13:39:43 +01:00
preferences Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
previewutils Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
push Add a foreground service with a wakelock for fetching push notifications (#6321) 2026-03-17 14:24:26 +01:00
pushproviders Add a foreground service with a wakelock for fetching push notifications (#6321) 2026-03-17 14:24:26 +01:00
pushstore Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
qrcode Link new device using QrCode. 2025-12-16 16:14:04 +01:00
recentemojis API modules do not need to setup dependency injection. 2025-11-12 19:05:39 +01:00
roomselect Add tests and clean code after RoomList Filter rework 2026-01-30 15:33:51 +01:00
rustsdk
session-storage It seems that SqlDelight v2.3.1 does not like unnecessary file 2026-03-13 18:53:08 +01:00
testtags Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
textcomposer Sync string again. 2026-03-16 14:54:06 +01:00
troubleshoot Sync Strings from Localazy 2026-03-16 00:42:32 +00:00
ui-common Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
ui-strings Sync string again. 2026-03-16 14:54:06 +01:00
ui-utils Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
usersearch Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
voiceplayer Apply suggestion: 2026-02-27 09:52:17 +01:00
voicerecorder Add unit test to ensure that number of levels is limited. 2025-11-27 09:30:22 +01:00
wellknown Let enterprise build be able to use a different notification channel for noisy notification. 2026-02-11 11:57:01 +01:00
workmanager Simplify push notification flow by using locally stored values for pending pushes (#6258) 2026-03-03 15:14:36 +00:00