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)
Fri, Jun 14, 8:59 PM
Unknown Object (File)
Wed, Jun 12, 5:53 AM
Unknown Object (File)
May 17 2024, 8:12 PM
Unknown Object (File)
May 17 2024, 8:12 PM
Unknown Object (File)
May 17 2024, 8:11 PM
Unknown Object (File)
May 17 2024, 8:11 PM
Unknown Object (File)
May 14 2024, 9:22 PM
Unknown Object (File)
Apr 23 2024, 4:01 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.