Package com.bosch.wdw

Class WDWPushHelper


  • public final class WDWPushHelper
    extends java.lang.Object
    A small helper class that provides useful methods related to push handling. Use it to
    • forward push messages to the WDW-SDK using #forwardMessage(RemoteMessage, Context)
    • notify the WDW-SDK about new tokens using notifyToken(Context)

    If an own instance of the FirebaseMessagingService is used, the methods provided within the WDWPushHelper should be used.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void forwardMessage​(RemoteMessage remoteMessage, android.content.Context context)
      Forwards push messages into the WDW-SDK.
      static void notifyToken​(android.content.Context context)
      Informs the WDW-SDK that a new token is available.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • forwardMessage

        public static void forwardMessage​(RemoteMessage remoteMessage,
                                          android.content.Context context)
        Forwards push messages into the WDW-SDK.

        If an own instance of the FirebaseMessagingService is used, this method should be called to forward the push message into the WDW-SDK.

        This method with only forward push messages into the WDW-SDK if it is configured using an instance of the PushConfig class.

        Parameters:
        remoteMessage - The unmodified push message
        context - The application context
        Throws:
        java.lang.IllegalArgumentException - in case either the remoteMessage or context parameter is null.
      • notifyToken

        public static void notifyToken​(android.content.Context context)
        Informs the WDW-SDK that a new token is available.

        If an own instance of the FirebaseMessagingService is used, this method should be called to notify the WDW-SDK that a new token is available.

        This method will only work if the WDW-SDK is configured using an instance of the PushConfig class.

        Parameters:
        context - The application context
        Throws:
        java.lang.IllegalArgumentException - in case the context parameter is null.