Accept notification_icon_color as preferred alias to color - #7091
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Android companion app’s notification handling to accept a new notification payload key, notification_icon_color, as the preferred alias for the existing color key. This aligns Android with the iOS app payload format while maintaining backward compatibility.
Changes:
- Prefer
notification_icon_colorovercolorwhen settingNotificationCompat.Builder.color - Preserve existing behavior by falling back to
colorwhen the new key is absent
|
Could you add a link to the documentation that updates this too? |
|
I think it would also be nice to have this string as a const like |
|
@TimoPtr PR for documentation: home-assistant/companion.home-assistant#1362 @jpelgrom I've moved |
I didn't mean the same for |
Summary
Accept
notification_icon_coloras preferred alias tocolorin notification data.The iOS app now uses
notification_icon_colorto specify the notification icon color, ascoloris not preferred due to other color attributes existing too.This change supports the
notification_icon_colorparameter alongside the oldcolorparameter.If both parameters are present,
colorwill be ignored.Checklist
Any other notes
Requires update to Firebase Cloud Messaging to support the new key on Android. home-assistant/mobile-apps-fcm-push#328
Documentation PR: home-assistant/companion.home-assistant#1362