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
renovate[bot]
2b04c4bfc0
Update metro to v0.11.2 ( #6270 )
...
* Update metro to v0.11.2
* Bind push tests to the right scope .Add a comment so we don't forget to do it for future ones.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-03-03 13:39:43 +01:00
bmarty
25c723c35a
Sync Strings from Localazy
2026-02-23 00:39:49 +00:00
Benoit Marty
c901772145
Metro 0.10.0: Classes annotated with ContributesIntoSet do not need to be annotated with Inject.
2026-01-20 10:13:39 +01:00
Jorge Martín
b91e3cfb84
Do some cleanup in VectorUnifiedPushMessagingReceiverBindings
2025-12-22 14:17:19 +01:00
Benoit Marty
4aadbed0b1
Fix test issue: "java.security.KeyStoreException: AndroidKeyStore not found"
2025-12-19 09:27:11 +01:00
ElementBot
ad881c303a
Sync Strings from Localazy ( #5904 )
...
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-12-15 23:51:19 +01:00
Benoit Marty
54e742075d
Detekt: enable rule exceptions.SwallowedException and fix existing issue.
2025-12-05 09:45:23 +01:00
S1m
c4dd960e0d
Fix push gateway with some push provider (Sunup/autopush) ( #5741 )
...
* Add more HTTP response code returning NoMatrixGateway
Fix Push notifications with Mozilla's autopush that returns 406
* Update gateway resolver tests to match new known errors
2025-11-17 13:34:35 +01:00
Benoit Marty
1d7d00e4bb
Improve code readability and documentation.
2025-11-14 15:10:24 +01:00
Benoit Marty
dbb9bb1338
Update KDoc
2025-11-14 14:23:29 +01:00
Benoit Marty
f1e12c1c1c
Do not attempt to restore the pusher after 2 removal in a short time.
2025-11-13 23:15:00 +01:00
Benoit Marty
358731def3
Update comment
2025-11-13 18:06:27 +01:00
Benoit Marty
c453d2adac
Add unit test on DefaultUnifiedPushRemovedGatewayHandler
2025-11-13 15:34:33 +01:00
Benoit Marty
f9c0b9e8bb
UnifiedPush: emit error when registration fails.
...
Note that I did not manage to have the method `onRegistrationFailed` invoked. If the network is not available for instance, unregistering the previous pusher will fail first.
2025-11-13 14:56:20 +01:00
Benoit Marty
6b7e8f72f5
Improve logs
2025-11-13 12:26:46 +01:00
Benoit Marty
e706e5fa0e
Unregister the pusher when the topic is deleted (unregistered)
2025-11-13 12:26:35 +01:00
Benoit Marty
eb31505dc7
Copyright: Add Element Creations Ltd. copyright
2025-11-10 11:05:05 +01:00
Benoit Marty
f86431e663
Copyright: Add final period
2025-11-10 10:13:41 +01:00
Benoit Marty
c4e0370f41
Copyright: run command uv run license-editor --repository ../element-x-android
2025-11-10 10:09:26 +01:00
Benoit Marty
afdfe28ef4
Remove dependency on AppNavigationStateService from DefaultUnifiedPushCurrentUserPushConfigProvider
2025-10-23 15:37:31 +02:00
Benoit Marty
263e761907
Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding
2025-10-22 18:52:37 +02:00
Benoit Marty
df48ed5a2d
Introduce JsonProvider.
...
It will ensure that classes are using the correct Json instances in the unit tests.
2025-10-20 09:40:42 +02:00
Benoit Marty
b01de9efa7
Fix tests.
2025-10-16 18:16:48 +02:00
Benoit Marty
7c437761c4
Move Json provider from Network module to AppModule to reuse it.
2025-10-16 16:37:08 +02:00
Benoit Marty
a02b2283af
Merge pull request #5443 from element-hq/renovate/org.unifiedpush.android-connector-3.x
...
fix(deps): update dependency org.unifiedpush.android:connector to v3.1.0
2025-10-10 17:52:33 +02:00
Benoit Marty
8f9115fb05
Need to be a compose library for Distributor to be considered stable.
2025-10-09 18:22:37 +02:00
Benoit Marty
7ce4b47203
Improve current push provider test: give info about the distributor.
2025-10-07 15:17:59 +02:00
Benoit Marty
9436ea55a3
Fix API break in tests.
2025-10-06 22:39:33 +02:00
ElementBot
95949e615f
Sync Strings from Localazy ( #5427 )
...
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-09-29 15:10:21 +00:00
Benoit Marty
8d5078904a
Introduce runAndTestState extension on NotificationTroubleshootTest
2025-09-23 09:46:21 +02:00
Benoit Marty
a83fc2aa1d
Add default value for Failure.hasQuickFix
2025-09-23 09:13:45 +02:00
Benoit Marty
fa14e4c106
Add notification troubleshoot test about blocked users.
2025-09-23 08:59:40 +02:00
Benoit Marty
1cc7afb585
Make PushData.clientSecret mandatory.
...
Also do not restore the last session as a fallback, it can lead to error in a multi account context, or even when a ghost pusher send a Push.
2025-09-19 08:57:23 +02:00
Benoit Marty
a575019760
Use DependencyHandlerScope.testCommonDependencies()
2025-09-16 14:38:31 +02:00
bmarty
8027ce9dca
Sync Strings from Localazy
2025-09-05 07:44:19 +00:00
Jorge Martín
e8328858ab
Fixes after rebase
2025-09-04 16:49:21 +02:00
Jorge Martín
6a05e1b911
Improve the fix for push notifications and MessagingReceiver being unknown to the DI
2025-09-04 16:49:21 +02:00
Jorge Martín
badd8aa8a1
Fix push notification bindings
2025-09-04 16:49:21 +02:00
Jorge Martín
de8de61b2e
Remove dagger and anvil dependencies, try to simplify gradle build scripts a bit
2025-09-04 16:49:21 +02:00
Jorge Martín
4ab62a6a38
Redo DI gradle setup code
2025-09-04 16:49:20 +02:00
Jorge Martín
29a97fc0d9
Fix lint issues and restore commented out code
2025-09-04 16:49:18 +02:00
Jorge Martín
b76a71ebf5
Start migrating Anvil KSP to Metro
2025-09-04 16:48:34 +02:00
Benoit Marty
025131841b
Cleanup tests.
2025-09-01 15:03:41 +02:00
Benoit Marty
75a640b986
Refactor: Move InMemorySessionStore to test module
...
- Delete `libraries/session-storage/impl-memory` module
- Move `InMemorySessionStore.kt` to `libraries/session-storage/test`
2025-09-01 14:47:42 +02:00
ganfra
1fe347ff1b
deps (firebase) : bom >= 34.0.0 doesn't have ktx module anymore
2025-07-22 18:23:42 +02:00
bmarty
284241a4ec
Sync Strings from Localazy
2025-06-30 00:33:54 +00:00
Benoit Marty
624bf7bc49
Create a loggerTag val.
2025-06-11 14:54:46 +02:00
ElementBot
520c1293b6
Sync Strings from Localazy ( #4842 )
...
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-06-11 14:13:33 +02:00
Benoit Marty
5f191d9f9c
Fix coroutine scope ( #4820 )
...
* Inject the session scope instead of the application scope where it's possible.
* Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
2025-06-04 15:33:51 +00:00