Skip to content

WIP feat(fcm): Add support for AndroidConfigV2#1227

Draft
jonathanedey wants to merge 3 commits into
mainfrom
je-fcm-v2
Draft

WIP feat(fcm): Add support for AndroidConfigV2#1227
jonathanedey wants to merge 3 commits into
mainfrom
je-fcm-v2

Conversation

@jonathanedey

Copy link
Copy Markdown
Contributor

This change implements support for the Android v2 API and it deprecates v1 AndroidConfig structures and replaces them with the new AndroidConfigV2 structures.

Adds AndroidConfigV2, AndroidNotificationV2, AndroidRemoteNotification, and AndroidBackgroundSyncMessage types.
Deprecates AndroidConfig and AndroidNotification.

@jonathanedey jonathanedey changed the title feat(fcm): Add support for AndroidConfigV2 WIP feat(fcm): Add support for AndroidConfigV2 Jul 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Android v2 configuration support for Firebase Cloud Messaging by deprecating the legacy AndroidConfig and AndroidNotification classes and introducing their v2 counterparts: AndroidConfigV2, AndroidNotificationV2, AndroidBackgroundSyncMessage, and AndroidRemoteNotification. The Message class has been updated to support these new configurations as mutually exclusive options with the legacy v1 fields, and comprehensive unit tests have been added. The review feedback focuses on improving AndroidNotificationV2 by statically importing checkNotNull, defining static final constants for regular expressions and date formatting to improve performance, specifying Locale.ENGLISH for locale-safe string conversions, and adding robust null checks for builder arguments.

Comment thread src/main/java/com/google/firebase/messaging/AndroidNotificationV2.java Outdated
Comment thread src/main/java/com/google/firebase/messaging/AndroidNotificationV2.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant