From 1bc40837feafff957ed4a04082f14ec3b6dc57eb Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 22 Sep 2024 12:22:01 +0200 Subject: [PATCH] add reference for the 20 seconds time span --- .../securesms/notifications/FcmReceiveService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gplay/java/org/thoughtcrime/securesms/notifications/FcmReceiveService.java b/src/gplay/java/org/thoughtcrime/securesms/notifications/FcmReceiveService.java index ebaaf604c..85953bbf4 100644 --- a/src/gplay/java/org/thoughtcrime/securesms/notifications/FcmReceiveService.java +++ b/src/gplay/java/org/thoughtcrime/securesms/notifications/FcmReceiveService.java @@ -97,9 +97,13 @@ public class FcmReceiveService extends FirebaseMessagingService { public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { Log.i(TAG, "FCM push notification received"); FetchForegroundService.start(this); - if (!ApplicationContext.dcAccounts.backgroundFetch(19)) { // we should complete within 20 seconds + + // we should complete within 20 seconds, + // see https://firebase.google.com/docs/cloud-messaging/android/receive + if (!ApplicationContext.dcAccounts.backgroundFetch(19)) { FetchForegroundService.stop(this); } + Log.i(TAG, "background fetch done"); }