Page MenuHomePhabricator

[native] Send PONG when PING is received
ClosedPublic

Authored by tomek on Feb 8 2022, 6:58 AM.
Tags
None
Referenced Files
F1779289: D3134.id9517.diff
Fri, May 17, 8:12 PM
F1779288: D3134.id9396.diff
Fri, May 17, 8:12 PM
F1779287: D3134.id.diff
Fri, May 17, 8:11 PM
F1779286: D3134.diff
Fri, May 17, 8:11 PM
Unknown Object (File)
Tue, May 14, 9:22 PM
Unknown Object (File)
Tue, Apr 23, 4:01 AM
Unknown Object (File)
Thu, Apr 18, 10:39 PM
Unknown Object (File)
Thu, Apr 18, 10:39 PM

Details

Summary

Check background notification type and react accordingly

Depends on D3133

Test Plan

Send a background notification on Android and check if the code on C++ was executed

{
  data: {
    backgroundNotifType: 'PING',
  },
}

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java
88–89 ↗(On Diff #9396)

We're not sending this notif yet. This handling is similar to what can be found in handleBackgroundNotification in AppDelegate.mm.

tomek requested review of this revision.Feb 8 2022, 7:09 AM
tomek planned changes to this revision.Feb 8 2022, 9:29 AM
tomek requested review of this revision.Feb 9 2022, 4:58 AM
karol added inline comments.
native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java
89 ↗(On Diff #9396)

won't this break the build? In D3132 NetworkModule is an empty class.

This revision now requires changes to proceed.Feb 9 2022, 5:07 AM
karol added inline comments.
native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java
89 ↗(On Diff #9396)

Sorry I got the order of revisions wrong, all good here.

This revision is now accepted and ready to land.Feb 9 2022, 5:08 AM
This revision now requires review to proceed.Feb 9 2022, 5:08 AM
This revision is now accepted and ready to land.Feb 9 2022, 9:39 PM
native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java
89 ↗(On Diff #9396)

It would've been good to establish a "Depends On" relationship with D3132 and D3133 here

native/android/app/src/main/java/app/comm/android/CommNotificationsHandler.java
89 ↗(On Diff #9396)

Makes sense. I added it here and will add in the future

This revision was automatically updated to reflect the committed changes.