Class ConnectMessagingService



  • public class ConnectMessagingService
    extends FirebaseMessagingService

    Handles incoming notifications from Firebase. The SDK will attempt to parse the message received into a NotificationPayload object which represents the data of a Connect notification. This service should be registered in the Android manifest of the host app.

    
         <service android:name="com.zendesk.connect.ConnectMessagingService">
             <intent-filter>
                 <action android:name="com.google.firebase.MESSAGING_EVENT"/>
             </intent-filter>
         </service>
     

    By default the SDK will build and display notifications received from Connect but will not do anything for notifications received from other external sources. To handle any other pushes you should extend this class and implement the public methods as needed.

    • Constructor Detail

      • ConnectMessagingService

        public ConnectMessagingService()
    • Method Detail

      • onMessageReceived

        public final void onMessageReceived(RemoteMessage message)
      • handleNonConnectNotification

        public void handleNonConnectNotification(RemoteMessage message)
        Called when a non-Connect notification is received that we will not handle ourselves. This method can be overridden to allow integrators to handle their own push notifications.
        Parameters:
        message - the RemoteMessage received from the push notification
      • onNotificationReceived

        public void onNotificationReceived(NotificationPayload payload)
        Called after a Connect notification is received regardless of whether they display or not. This method can be overridden to handle custom payload properties.
        Parameters:
        payload - the NotificationPayload created from the push received
      • onNotificationDisplayed

        public void onNotificationDisplayed(NotificationPayload payload)
        Called after a Connect notification is displayed.
        Parameters:
        payload - the NotificationPayload created from the push received
      • provideCustomNotification

        public Notification provideCustomNotification(NotificationPayload payload)
        Build the Notification to be displayed
        Parameters:
        payload - the NotificationPayload parsed from the notification received
        Returns:
        a constructed Notification