Class FcmSendMessageRequest.Builder

    • Constructor Detail

      • Builder

        public Builder()
        Constructs a new builder for an FCM send message request.
    • Method Detail

      • withCollapseKey

        public FcmSendMessageRequest.Builder withCollapseKey​(@Nonnull
                                                             String collapseKey)
        Sets the group of messages that can be collapsed.
        Parameters:
        collapseKey - the group of messages that can be collapsed.
        Returns:
        the builder.
      • withContentAvailable

        public FcmSendMessageRequest.Builder withContentAvailable​(boolean contentAvailable)
        Sets whether or not to indicate to the client that content is available in order to wake the device. Note: for messages to iOS devices only.
        Parameters:
        contentAvailable - whether or not to indicate to the client that content is available in order to wake the device.
        Returns:
        the builder.
      • withMutableContent

        public FcmSendMessageRequest.Builder withMutableContent​(boolean mutableContent)
        Sets whether or not the content in the message can be mutated. Note: for messages to iOS devices only.
        Parameters:
        mutableContent - whether or not the content in the message can be mutated.
        Returns:
        the builder.
      • withTimeToLive

        public FcmSendMessageRequest.Builder withTimeToLive​(long timeToLive)
        Sets how long (in seconds) the message should be kept in FCM storage if the device is offline.
        Parameters:
        timeToLive - how long (in seconds) the message should be kept in FCM storage if the device is offline.
        Returns:
        the builder.
      • withNotification

        public FcmSendMessageRequest.Builder withNotification​(@Nonnull
                                                              FcmSendMessageNotification notification)
        Sets the predefined, user-visible key-value pairs of the notification payload.
        Parameters:
        notification - the predefined, user-visible key-value pairs of the notification payload.
        Returns:
        the builder.