Page MenuHomePhabricator

Enable encrypted notifications coalescing on in Androoid native code.
ClosedPublic

Authored by marcin on Sep 14 2023, 2:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 2, 3:53 PM
Unknown Object (File)
Aug 26 2024, 9:08 PM
Unknown Object (File)
Aug 26 2024, 7:32 PM
Unknown Object (File)
Aug 26 2024, 1:35 AM
Unknown Object (File)
Aug 25 2024, 8:51 PM
Unknown Object (File)
Aug 25 2024, 4:06 AM
Unknown Object (File)
Aug 11 2024, 10:34 PM
Unknown Object (File)
Aug 10 2024, 12:19 AM
Subscribers

Details

Summary

Notification coalescing on Android is done automatically when we pass to NotificationManager.notify() and id that has been passed previously. The OS replaces the previous notification with the new one. That said to support encrypted notifications coalescing we have to:

  1. Always provide brand id field of the notification.
  2. Put the collapseKey in the encrypted notification payload.
  3. One the device look for the collapseKey in the payload after decryption and use it instead of id in case it is present.
Test Plan
  1. Build Android app.
  2. Apply this patch to the keyserver: https://gist.github.com/marcinwasowicz/4a794560ef7cdac30dc15da75918a99d
  3. Test that notifications like chat description update are correctly coalesced.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-4634
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Sep 14 2023, 2:53 AM
marcin edited the test plan for this revision. (Show Details)

Rebase before landing