-
Notifications
You must be signed in to change notification settings - Fork 261
feat(android): Support android call notification style #1134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(android): Support android call notification style #1134
Conversation
8f906ab to
1bc815f
Compare
|
Just to note I see these commits flying by in my notification queue and I'm excited to see this when you think it's ready |
😮 I can remove the draft PR; I thought the draft would not spam, sorry
Yeah, I struggled since on 1.10, I had some duplicate deps errors and needed to update the rooms deps too. So yeah, I'm doing the minimal since it is not the focus, as you mentioned! While I have your attention, I struggle with the |
|
No worries about spam, it's a drop in the bucket and it's pleasing to see notificaitons about a feature PR vs yet another "I can't compile NNN because of ABC" issue comment 😅
I'm a fan of "tested and working" over perfect, so I lean towards something that you know works first. Second, I'm not sure what exactly would be better, passing it down the way it is now doesn't seem so bad The only thing I can see that makes me 🤔 is the inconsistent use of constants vs "magic numbers and strings" - I love the enums at the TS level and it would be nice to see constants or enums to match at the java level (and in the TS warning, which uses the numbers again vs the call types) In general though, looks like it is shaping up. At first I thought this was just duplication of our full screen intent style (which is targeted for this use case as well) but as soon as I looked at the APIs in use it looks like this is just me being unaware of the problem area and that the APIs have moved on (as they always seem to for notifications...) to have specific call notification type for modern android. Nice to support it |
|
That's wonderful! |
e4cdf9b to
6e86b52
Compare
|
Do I need to create a feature issue for this PR, or is the PR only OK? |
|
PR only is just fine - no need for administrivia like an issue just to close it, if there is a PR in flight already |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1134 +/- ##
==========================================
+ Coverage 77.08% 77.81% +0.74%
==========================================
Files 32 32
Lines 1727 1771 +44
Branches 556 592 +36
==========================================
+ Hits 1331 1378 +47
+ Misses 395 340 -55
- Partials 1 53 +52 |
|
Hey there, I was wondering if I could help with anything regarding the next steps on that PR. Thanks! |
|
Sorry for the slow pace - progress here is happening it's just not visible (yet) One of the biggest barriers to testing all-things-Notifee is that so much of it is in response to cloud messaging, and that necessarily requires a firebase project setup, an apple development account with messaging certs and keys setup and connected and everything, and that hadn't been done except for "borrowing" personal accounts for temporary / local unshareable one-off testing. I'm nearly done with the process of having it set up in a permanent + general way, to unblock all testing, which then unblocks all this new feature + and foreground/background event-handling issue backlog |
|
Great, thanks for the info. Your astonishing work and dedication are just amazing! Thanks again @mikehardy |
Without room update we had errors like below ``` Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.0 ```
Needed to upgrade to `androidx.core:core` to 1.10 where they support callStyle in `NotificationCompat`
b9d8b42 to
91f59a4
Compare
|
Rebased! Ready again! |
|
Playing around with this locally, and I'm noticing that the heads up notification is visible for 5ish seconds, then disappears into the notification drawer. Am I missing something? |
After adding the |
|
@mikehardy could you please merge this PR ? Thanks |
|
Support for the verification text and icon was also added in 4798fdc |
|
Any updates on this PR? |
|
I tried using this PR (built the package locally from your fork). Call type notification is not having any effect, no buttons are shown. |
|
btw, here is my implmentation: |
|
Seems the package is not having the updated code from PR. |
|
@dprevost-LMI I am not able to use your fork. Can you please provide steps on how to use it in a react native app. I tried manually building but once used in the app, the app was failing to build. |
It was not meant to be used as a release package, but to be merged. Unfortunately, this one will need to be figured out without me 😉 |
|
FInally, packed it locally and used in my app. Working now. Thanks for this great work. Thanks for saving me a lot of time. |


PR introducing the new Android 12 CallStyle notification related to phone calls.
CallStyle can produce three different notifications:
With Verification text and icon:

Notes on the changes:
androidx.core:core:1.10.0was required to have the CallStyle insideNotificationCompat(See also this google issue about it). This update also generates the room update. Otherwise, duplicated lib errors were generatedpressActionsand create a pending intent instead of behind outside of the style like the other (and be genericpressActionsprops)CONTRIBUTING.mdandroidx.core:coreversion or even theirandroidx.core:core-ktxto at least1.10