Skip to content

Commit af6f3d9

Browse files
authored
Update doc string for dryRun in FCM send methods. (#509)
* Update doc string for dryRun in FCM send methods to mention that it cannot be used to validate APNS tokens.
1 parent 771a8ee commit af6f3d9

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/main/java/com/google/firebase/messaging/FirebaseMessaging.java

+10-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ public String send(@NonNull Message message) throws FirebaseMessagingException {
9090
* Sends the given {@link Message} via Firebase Cloud Messaging.
9191
*
9292
* <p>If the {@code dryRun} option is set to true, the message will not be actually sent. Instead
93-
* FCM performs all the necessary validations, and emulates the send operation.
93+
* FCM performs all the necessary validations and emulates the send operation. The {@code dryRun}
94+
* option is useful for determining whether an FCM registration has been deleted. However, it
95+
* cannot be used to validate APNs tokens.
9496
*
9597
* @param message A non-null {@link Message} to be sent.
9698
* @param dryRun a boolean indicating whether to perform a dry run (validation only) of the send.
@@ -161,8 +163,10 @@ public BatchResponse sendAll(
161163
* send the entire list as a single RPC call. Compared to the {@link #send(Message)} method, this
162164
* is a significantly more efficient way to send multiple messages.
163165
*
164-
* <p>If the {@code dryRun} option is set to true, the messages will not be actually sent. Instead
165-
* FCM performs all the necessary validations, and emulates the send operation.
166+
* <p>If the {@code dryRun} option is set to true, the message will not be actually sent. Instead
167+
* FCM performs all the necessary validations, and emulates the send operation. The {@code dryRun}
168+
* option is useful for determining whether an FCM registration has been deleted. But it cannot be
169+
* used to validate APNs tokens.
166170
*
167171
* <p>The responses list obtained by calling {@link BatchResponse#getResponses()} on the return
168172
* value corresponds to the order of input messages.
@@ -227,7 +231,9 @@ public BatchResponse sendMulticast(
227231
* Sends the given multicast message to all the FCM registration tokens specified in it.
228232
*
229233
* <p>If the {@code dryRun} option is set to true, the message will not be actually sent. Instead
230-
* FCM performs all the necessary validations, and emulates the send operation.
234+
* FCM performs all the necessary validations, and emulates the send operation. The {@code dryRun}
235+
* option is useful for determining whether an FCM registration has been deleted. But it cannot be
236+
* used to validate APNs tokens.
231237
*
232238
* <p>This method uses the {@link #sendAll(List)} API under the hood to send the given
233239
* message to all the target recipients. The responses list obtained by calling

0 commit comments

Comments
 (0)