diff --git a/src/main/java/com/google/firebase/messaging/ApnsConfig.java b/src/main/java/com/google/firebase/messaging/ApnsConfig.java index 0e5de8619..ff35a962a 100644 --- a/src/main/java/com/google/firebase/messaging/ApnsConfig.java +++ b/src/main/java/com/google/firebase/messaging/ApnsConfig.java @@ -32,6 +32,9 @@ */ public class ApnsConfig { + @Key("live_activity_token") + private final String liveActivityToken; + @Key("headers") private final Map headers; @@ -45,6 +48,7 @@ private ApnsConfig(Builder builder) { checkArgument(builder.aps != null, "aps must be specified"); checkArgument(!builder.customData.containsKey("aps"), "aps cannot be specified as part of custom data"); + this.liveActivityToken = builder.liveActivityToken; this.headers = builder.headers.isEmpty() ? null : ImmutableMap.copyOf(builder.headers); this.payload = ImmutableMap.builder() .putAll(builder.customData) @@ -64,6 +68,7 @@ public static Builder builder() { public static class Builder { + private final String liveActivityToken; private final Map headers = new HashMap<>(); private final Map customData = new HashMap<>(); private Aps aps; @@ -71,6 +76,14 @@ public static class Builder { private Builder() {} + /** + * Sets the liveActivityToken. + */ + public Builder set(String liveActivityToken) { + this.liveActivityToken = liveActivityToken; + return this; + } + /** * Adds the given key-value pair as an APNS header. *