-
public class ChatNotificationHandlerClass responsible for handling chat notifications.
-
-
Field Summary
Fields Modifier and Type Field Description private final NotificationConfigconfig
-
Constructor Summary
Constructors Constructor Description ChatNotificationHandler(Context context, NotificationConfig config)ChatNotificationHandler(Context context)
-
Method Summary
-
-
Constructor Detail
-
ChatNotificationHandler
ChatNotificationHandler(Context context, NotificationConfig config)
-
ChatNotificationHandler
ChatNotificationHandler(Context context)
-
-
Method Detail
-
getConfig
final NotificationConfig getConfig()
-
onChatEvent
Boolean onChatEvent(NewMessageEvent event)
Handles showing notification after receiving NewMessageEvent from other users. Default implementation loads necessary data and displays notification even if app is in foreground.
-
onPushMessage
Boolean onPushMessage(PushMessage message)
Handles showing notification after receiving PushMessage. Default implementation loads necessary data from the server and shows notification if application is not in foreground.
-
getDeviceRegisteredListener
DeviceRegisteredListener getDeviceRegisteredListener()
-
getDataLoadListener
NotificationLoadDataListener getDataLoadListener()
-
createNotificationChannel
@RequiresApi(api = 26) NotificationChannel createNotificationChannel()
-
getNotificationChannelId
String getNotificationChannelId()
-
getNotificationChannelName
String getNotificationChannelName()
-
getErrorCaseNotificationTitle
String getErrorCaseNotificationTitle()
-
getErrorCaseNotificationContent
String getErrorCaseNotificationContent()
-
buildErrorCaseNotification
Notification buildErrorCaseNotification()
-
buildNotification
NotificationCompat.Builder buildNotification(Integer notificationId, Channel channel, Message message)
-
buildNotificationGroupSummary
NotificationCompat.Builder buildNotificationGroupSummary(Channel channel, Message message)
-
buildErrorNotificationGroupSummary
Notification buildErrorNotificationGroupSummary()
-
getNotificationGroupKey
String getNotificationGroupKey(String channelType, String channelId)
-
getNotificationGroupSummaryId
Integer getNotificationGroupSummaryId(String channelType, String channelId)
-
getErrorNotificationGroupKey
String getErrorNotificationGroupKey()
-
getErrorNotificationGroupSummaryId
Integer getErrorNotificationGroupSummaryId()
-
getNewMessageIntent
Intent getNewMessageIntent(String messageId, String channelType, String channelId)
-
getErrorCaseIntent
Intent getErrorCaseIntent()
-
-
-
-