Interface MessageReceiver



  • public interface MessageReceiver
    Receiver that acts as a pass-through for non-Connect RemoteMessages, allowing an integrator to handle their own push payloads.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void onDeletedMessages(Service service)
      Called when the FCM server deletes pending messages.
      void onMessageReceived(RemoteMessage remoteMessage, Service service)
      Invoked when a RemoteMessage is received that does not belong to a Connect push.
      void onMessageSent(java.lang.String messageId, Service service)
      Called when an upstream message has been successfully sent.
      void onNewToken(java.lang.String token, Service service)
      Called when a new token for the default Firebase project is generated.
      void onSendError(java.lang.String messageId, java.lang.Exception exception, Service service)
      Called when there was an error sending an upstream message.
    • Method Detail

      • onMessageReceived

        void onMessageReceived(RemoteMessage remoteMessage,
                               Service service)
        Invoked when a RemoteMessage is received that does not belong to a Connect push.
        Parameters:
        remoteMessage - the RemoteMessage received in the push payload
        service - the Service context from which the message was received
      • onDeletedMessages

        void onDeletedMessages(Service service)
        Called when the FCM server deletes pending messages.
        Parameters:
        service - the Service context from which this call was made
      • onMessageSent

        void onMessageSent(java.lang.String messageId,
                           Service service)
        Called when an upstream message has been successfully sent.
        Parameters:
        messageId - the id of the message sent upstream
        service - the Service context from which this call was made
      • onSendError

        void onSendError(java.lang.String messageId,
                         java.lang.Exception exception,
                         Service service)
        Called when there was an error sending an upstream message.
        Parameters:
        messageId - the id of the message being sent upstream
        exception - the exception that occurred
        service - the Service context from which this call was made
      • onNewToken

        void onNewToken(java.lang.String token,
                        Service service)
        Called when a new token for the default Firebase project is generated.
        Parameters:
        token - the new device token
        service - the Service context from which this call was made