Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3293539
D3134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3134.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3134: [native] Send PONG when PING is received
Attached
Detach File
Event Timeline
Log In to Comment