Skip to content

feat(fcm): Add liveActivityToken to ApnsConfig #1094

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lahirumaramba
Copy link
Member

@lahirumaramba lahirumaramba commented May 23, 2025

Adds a new liveActivityToken field to the ApnsConfig class, allowing you to specify a Live Activity token for APNS messages.

The changes include:

  • Addition of the liveActivityToken field in ApnsConfig.java and its associated builder.
  • Updates to unit tests in MessageTest.java to verify the correct serialization of the new field and to include it in existing test cases. A new test method testApnsMessageWithOnlyLiveActivityToken was added for specific testing.
  • Update to the integration test in FirebaseMessagingIT.java to include the liveActivityToken in a test message.

Adds a new `liveActivityToken` field to the `ApnsConfig` class, allowing you to specify a Live Activity token for APNS messages.

The changes include:
- Addition of the `liveActivityToken` field in `ApnsConfig.java` and its associated builder.
- Updates to unit tests in `MessageTest.java` to verify the correct serialization of the new field and to include it in existing test cases. A new test method `testApnsMessageWithOnlyLiveActivityToken` was added for specific testing.
- Update to the integration test in `FirebaseMessagingIT.java` to include the `liveActivityToken` in a test message.

An unrelated fix was also included in `MessageTest.java` to correctly use `new BigDecimal(long)` instead of `BigDecimal.valueOf(long)` for `notification_count`.
@lahirumaramba lahirumaramba added release-note release:stage Stage a release candidate labels May 23, 2025
google-labs-jules bot and others added 2 commits May 23, 2025 22:27
Corrects the `@Key` annotation for the `liveActivityToken` field in `ApnsConfig.java` from "live-activity-token" to "live_activity_token" to follow snake_case convention for JSON mapping.

Unit tests in `MessageTest.java` have been updated to reflect this change in the expected JSON output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:stage Stage a release candidate release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants