Package com.bosch.wdw
Class WDWPushHelper
java.lang.Object
com.bosch.wdw.WDWPushHelper
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
Modifier and TypeMethodDescriptionstatic voidforwardMessage(RemoteMessage remoteMessage, android.content.Context context) Forwards push messages into the WDW-SDK.static voidnotifyToken(android.content.Context context) Informs the WDW-SDK that a new token is available.
-
Method Details
-
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
PushConfigclass.- Parameters:
remoteMessage- The unmodified push messagecontext- The application context- Throws:
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
PushConfigclass.- Parameters:
context- The application context- Throws:
IllegalArgumentException- in case the context parameter is null.
-