You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Represents a message that can be sent to multiple devices via Firebase Cloud Messaging (FCM).
33
34
* Contains payload information as well as the list of device registration tokens to which the
34
-
* message should be sent. A single {@code MulticastMessage} may contain up to 500 registration
35
+
* message should be sent. A single {@code MulticastMessage} may contain up to {@value com.google.firebase.messaging.FirebaseMessaging#MAX_MESSAGES_IN_LIST} registration
35
36
* tokens.
36
37
*
37
38
* <p>Instances of this class are thread-safe and immutable. Use {@link MulticastMessage.Builder}
@@ -56,7 +57,7 @@ public class MulticastMessage {
56
57
privateMulticastMessage(Builderbuilder) {
57
58
this.tokens = builder.tokens.build();
58
59
checkArgument(!this.tokens.isEmpty(), "at least one token must be specified");
59
-
checkArgument(this.tokens.size() <= 500, "no more than 500 tokens can be specified");
60
+
checkArgument(this.tokens.size() <= MAX_MESSAGES_IN_LIST, "no more than " + MAX_MESSAGES_IN_LIST + " tokens can be specified");
60
61
for (Stringtoken : this.tokens) {
61
62
checkArgument(!Strings.isNullOrEmpty(token), "none of the tokens can be null or empty");
62
63
}
@@ -107,7 +108,7 @@ public static class Builder {
107
108
privateBuilder() {}
108
109
109
110
/**
110
-
* Adds a token to which the message should be sent. Up to 500 tokens can be specified on
111
+
* Adds a token to which the message should be sent. Up to {@value com.google.firebase.messaging.FirebaseMessaging#MAX_MESSAGES_IN_LIST} tokens can be specified on
111
112
* a single instance of {@link MulticastMessage}.
112
113
*
113
114
* @param token A non-null, non-empty Firebase device registration token.
@@ -119,7 +120,7 @@ public Builder addToken(@NonNull String token) {
119
120
}
120
121
121
122
/**
122
-
* Adds a collection of tokens to which the message should be sent. Up to 500 tokens can be
123
+
* Adds a collection of tokens to which the message should be sent. Up to {@value com.google.firebase.messaging.FirebaseMessaging#MAX_MESSAGES_IN_LIST} tokens can be
123
124
* specified on a single instance of {@link MulticastMessage}.
124
125
*
125
126
* @param tokens Collection of Firebase device registration tokens.
0 commit comments