2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

NotificationCenter

The NotificationCenter model enables notification management. It allows setting the enforced notification mode, registering the IIncomingInvitationListener and VersionFilter models, and it includes methods notifying about the received invitations and canceled conferences.

Available in the package com.voxeet.sdk.push.center.NotificationCenter.

Methods

init

init(@NonNull eventBus: EventBus, @NonNull context: Context): void

Parameters

NameTypeDescription
eventBusEventBusnon null
contextContextnon null

setEnforcedNotificationMode

setEnforcedNotificationMode(@NonNull enforcedNotificationMode: EnforcedNotificationMode): NotificationCenter

Changes the notification management mode into the enforcedNotificationMode.

Parameters

NameTypeDescription
enforcedNotificationModeEnforcedNotificationModenon null a new mode

Returns: NotificationCenter - the current instance.

register

register(@NonNull notificationMode: NotificationMode, @Nullable invitationProvider: IIncomingInvitationListener): NotificationCenter

Registers the IIncomingInvitationListener model dedicated to the NotificationMode and replaces the prevoiusly used model if the NotificationMode has already an attached listener.

Parameters

NameTypeDescription
notificationModeNotificationModenon null valid NotificationMode that receives the provider
invitationProviderIIncomingInvitationListenernullable instance to register

Returns: NotificationCenter - the current instance.

register

register(@NonNull notificationMode: NotificationMode, @NonNull filter: VersionFilter): NotificationCenter

Registers the VersionFilter model for the specified NotificationMode.

Parameters

NameTypeDescription
notificationModeNotificationModenon null valid NotificationMode that receives the filter
filterVersionFilternon null filter to apply

Returns: NotificationCenter - the current instance.

onInvitationReceived

onInvitationReceived(@NonNull context: Context, @NonNull invitationBundle: InvitationBundle): void

Method called by the SDK when a WebSocket or a plugin receives a push notification concerning an invitation.

It is possible to use this method when the SDK works in a system that is not Firebase compatible or different library is used. If external push notifications are managed elsewhere, then transform the Bundle or data to a valid InvitationBundle model.

Parameters

NameTypeDescription
contextContextnon null valid context to use
invitationBundleInvitationBundlenon null InvitationBundle instance

onInvitationCanceledReceived

onInvitationCanceledReceived(@NonNull context: Context, @NonNull conferenceId: String): String

Method called by the SDK when WebSocket or a plugin receives a push notification concerning a cancelled invitation.

It is possible to use this method when the SDK works on a system that is not Firebase compatible or different library is used. If external push notifications are managed elsewhere, then transform the Bundle or data to a valid InvitationBundle model.

Parameters

NameTypeDescription
contextContextnon null valid context to use
conferenceIdStringnon null

Returns: @NonNull String - the corresponding conference ID