-
public class SendBirdPushHelper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
SendBirdPushHelper.OnPushRequestCompleteListener
SendBird push token registration event callback.
-
Method Summary
Modifier and Type Method Description static <T extends AbstractPushHandler> void
registerPushHandler(T handler)
Registers push handler for receiving FCM/HMS push notifications. static void
unregisterPushHandler(SendBirdPushHelper.OnPushRequestCompleteListener listener)
Unregisters push handler for not receiving FCM/HMS push notifications.When you call this we will request at the server to remove FCM/HMS push token. static void
unregisterPushHandler(boolean unRegisterAll, SendBirdPushHelper.OnPushRequestCompleteListener listener)
Unregisters push handler for not receiving FCM/HMS push notifications.When you call this we will request at the server to remove FCM/HMS push token. static boolean
isDuplicateMessage(Object remoteMessage)
When you received message you can call this and can figure out whether this message is duplicated. static void
getPushToken(OnPushTokenReceiveListener listener)
If you need to retrieve the current registration token you can call this. -
-
Method Detail
-
registerPushHandler
static <T extends AbstractPushHandler> void registerPushHandler(T handler)
Registers push handler for receiving FCM/HMS push notifications.To enable push notification and get a token, refer to SendBird Docs.When you call this we will register FCM/HMS push token, depending on the type of the handler, to server automatically.And you'll start receiving Push from handler (onMessageReceived)
- Parameters:
handler
- All FCM/HMS push messages can receive from this handler.
-
unregisterPushHandler
static void unregisterPushHandler(SendBirdPushHelper.OnPushRequestCompleteListener listener)
Unregisters push handler for not receiving FCM/HMS push notifications.When you call this we will request at the server to remove FCM/HMS push token.And you'll not be able to receive any more push notification
- Parameters:
listener
- Callback handler.
-
unregisterPushHandler
static void unregisterPushHandler(boolean unRegisterAll, SendBirdPushHelper.OnPushRequestCompleteListener listener)
Unregisters push handler for not receiving FCM/HMS push notifications.When you call this we will request at the server to remove FCM/HMS push token.And you'll not be able to receive any more push notification
- Parameters:
unRegisterAll
- if it set astrue
unregisters all push token bound to the current.listener
- Callback handler.
-
isDuplicateMessage
static boolean isDuplicateMessage(Object remoteMessage)
When you received message you can call this and can figure out whether this message is duplicated.
- Parameters:
remoteMessage
- received FCM/HMS message
-
getPushToken
static void getPushToken(OnPushTokenReceiveListener listener)
If you need to retrieve the current registration token you can call this.
- Parameters:
listener
- callback listener
-
-
-
-