Page MenuHomePhabricator

D3134.diff
No OneTemporary

D3134.diff

diff --git a/native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java b/native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java
--- a/native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java
+++ b/native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java
@@ -4,6 +4,7 @@
import android.content.Context;
import android.service.notification.StatusBarNotification;
import android.util.Log;
+import app.comm.android.fbjni.NetworkModule;
import com.google.firebase.messaging.RemoteMessage;
import io.invertase.firebase.messaging.RNFirebaseMessagingService;
import me.leolin.shortcutbadger.ShortcutBadger;
@@ -38,6 +39,7 @@
private static final String RESCIND_ID_KEY = "rescindID";
private static final String BADGE_KEY = "badge";
private static final String BADGE_ONLY_KEY = "badgeOnly";
+ private static final String BACKGROUND_NOTIF_TYPE_KEY = "backgroundNotifType";
private NotificationManager notificationManager;
@Override
@@ -81,6 +83,13 @@
return;
}
+ String backgroundNotifType =
+ message.getData().get(BACKGROUND_NOTIF_TYPE_KEY);
+ if ("PING".equals(backgroundNotifType)) {
+ NetworkModule.sendPong();
+ return;
+ }
+
super.onMessageReceived(message);
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 5:31 PM (21 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2530766
Default Alt Text
D3134.diff (1 KB)

Event Timeline