/** * Similar to {@link #send(Message, boolean)} but performs the operation asynchronously. * * @param message A non-null {@link Message} to be sent. * @param dryRun a boolean indicating whether to perform a dry run (validation only) of the send. * @return An {@code ApiFuture} that will complete with a message ID string when the message * has been sent, or when the emulation has finished. */ public ApiFuture<String> sendAsync(@NonNull Message message, boolean dryRun) { return sendOp(message, dryRun).callAsync(app); }
/** * Sends the given {@link Message} via Firebase Cloud Messaging. * * <p>If the {@code dryRun} option is set to true, the message will not be actually sent. Instead * FCM performs all the necessary validations, and emulates the send operation. * * @param message A non-null {@link Message} to be sent. * @param dryRun a boolean indicating whether to perform a dry run (validation only) of the send. * @return A message ID string. */ public String send(@NonNull Message message, boolean dryRun) throws FirebaseMessagingException { return sendOp(message, dryRun).call(); }