mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
add reference for the 20 seconds time span
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user