Page MenuHomePhabricator

[native] Send PONG when PING is received
ClosedPublic

Authored by tomek on Feb 8 2022, 6:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 1:14 AM
Unknown Object (File)
Thu, Nov 7, 7:25 AM
Unknown Object (File)
Thu, Nov 7, 4:44 AM
Unknown Object (File)
Sat, Nov 2, 4:41 AM
Unknown Object (File)
Sat, Nov 2, 4:41 AM
Unknown Object (File)
Sat, Nov 2, 4:41 AM
Unknown Object (File)
Sat, Nov 2, 4:37 AM
Unknown Object (File)
Fri, Oct 25, 12:00 AM

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.