Open dprevost-LMI opened 3 weeks ago
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 No rush of course, it's your effort :-) Totally fine with dependency updates as needed of course, core is actually on 1.15 now so bumping to 1.10 is arguably not even enough (but only doing what is necessary for the PR makes sense - no need to struggle on a side project of updating it)
Just to note I see these commits flying by in my notification queue
😮 I can remove the draft PR; I thought the draft would not spam, sorry
core is actually on 1.15 now so bumping to 1.10 is arguably not even enough
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 PendingIntent
creation. I reached a working point, but having them in the NotificationAndroidStyleModel.java.
I want to move that into its own class at some point.
However, I must pass the NotificationModel
pretty deep, which seems bad. If you have any suggestions about that, let me know
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 reached a working point, but having them in the NotificationAndroidStyleModel.java. I want to move that into its own class at some point. However, I must pass the NotificationModel pretty deep, which seems bad. If you have any suggestions about that, let me know
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
For your information, I just linked my project with my PR, and the first draft is working well in a happy path scenario! I hope to wrap this up in the upcoming weeks!
From Notifee example project it looks like this:
That's wonderful!
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
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.81%. Comparing base (
ae2953b
) to head (1817d5e
).
PR introducing the new Android 12 CallStyle notification related to phone calls.
CallStyle can produce three different notifications:
Incoming
Ongoing
Screening
Notes on the changes:
androidx.core:core:1.10.0
was required to have the CallSyle insideNotificationCompat
(See also this google issue about it). This update also generates the room update. Else duplicated lib errors were generatedpressActions
and create pending intent instead of behind outside of the style like the other (and be genericpressActions
props)CONTRIBUTING.md
⚠️ Dependant projects might also need to update their
androidx.core:core
version or even theirandroidx.core:core-ktx
to at least1.10
⚠️ There is a known limitation where additional limited custom actions, as claimed in the doc, do not work right now. See this Google issue