Commit c6970a5
* feat: Add liveActivityToken to ApnsConfig
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`.
* fix: Correct ApnsConfig liveActivityToken JSON key
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.
* remove unrelated changes
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Edey <[email protected]>
1 parent ac4a8ad commit c6970a5
File tree
3 files changed
+58
-5
lines changed- src
- main/java/com/google/firebase/messaging
- test/java/com/google/firebase/messaging
3 files changed
+58
-5
lines changedLines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
140 | 156 | | |
141 | 157 | | |
142 | 158 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
Lines changed: 41 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| 414 | + | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
| |||
421 | 422 | | |
422 | 423 | | |
423 | 424 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
| |||
442 | 444 | | |
443 | 445 | | |
444 | 446 | | |
| 447 | + | |
445 | 448 | | |
446 | 449 | | |
447 | 450 | | |
| |||
459 | 462 | | |
460 | 463 | | |
461 | 464 | | |
462 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
463 | 469 | | |
464 | 470 | | |
465 | 471 | | |
| |||
825 | 831 | | |
826 | 832 | | |
827 | 833 | | |
| 834 | + | |
828 | 835 | | |
829 | 836 | | |
830 | 837 | | |
| |||
837 | 844 | | |
838 | 845 | | |
839 | 846 | | |
| 847 | + | |
840 | 848 | | |
841 | 849 | | |
842 | 850 | | |
| |||
847 | 855 | | |
848 | 856 | | |
849 | 857 | | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
850 | 886 | | |
851 | 887 | | |
852 | 888 | | |
| |||
0 commit comments