Advanced features

Invite

Perform the steps below to invite users during the conference.

Inviting users

Use the invite method to invite users to a conference, as in the example below.

VoxeetSDK.conference.invite("some-conference-id", ["some-externalId", "some-externalId", "some-externalId"])

Where:

  • conferenceId: String - the corresponding conference ID or alias
  • externalIds: Array - an array of invited external ids

Invited users will receive the invitationReceived event.

Returns

To check if your code works correctly, use the Promise<Error> command.

VoxeetSDK.shared.notification.invite(conference: VTConference, externalIDs: ["String"], completion: { error in })

Inviting users

List<ParticipantInfo> participants = new ArrayList<>();
//add new ParticipantInfo(....) for each Participant to invite

//then call and resolve the following promise
Promise<List<Participant>> promise = VoxeetSDK.notification().invite("some-conference-id", participants);

Where:

  • conferenceId: String - the corresponding conference ID or alias
  • participants: List - an array of invited participants

Invited users will receive the invitationReceived event.

Manage Received Invitation

Implementing receiver

Invitation receiversmust be class implementing the IIncomingInvitationListener interface. When the current user is invited, the interface will receive a InvitationBundle to consume/propagate.

The interface also provides a method to manage canceled invitation from invited users.

public interface IIncomingInvitationListener {
    void onInvitation(@NonNull Context context, @NonNull InvitationBundle invitationBundle);

    void onInvitationCanceled(@NonNull Context context, @NonNull String conferenceId);
}

Once the interface has been implemented, the later implementation must be registered into the SDK to be called by it when needed.

Registering for invitations

Note : Using the uxkit-incoming-call dependency, IncomingFullScreen and IncomingNotification are available out of the box with support of the given metadata from this example

Registering into the NotificationService

An instance of IIncomingInvitationListener must be registered for a given NotificationMode.

Where NotificationMode can be of the following types :

  • FULLSCREEN_INCOMING_CALL
  • OVERHEAD_INCOMING_CALL

FullScreen Incoming call are activities on full screen displayed to users whereas overhead notifications are simple notifications inviting the user in the system's notifications center.

_Note : Android 10 changed behaviour for notifications and activities coming from non-user interactions and a filter must be added by developers (shown later)

    VoxeetSDK.notification()
        .register(NotificationMode.FULLSCREEN_INCOMING_CALL, new MyFullScreenInvitationListener())
        .register(NotificationMode.OVERHEAD_INCOMING_CALL, new MyOverHeadIncomingInvitationListener());

Note : only one listener can be set for each more, calling the mode again will simply replace the listener for the given mode

Registering into the NotificationCenter

In case of non-Application level initialization level, developers can use the NotificationCenter singleton to proactively register and set elements to warmup every required elements.

This can be done using NotificationCenter.initialize.

Such configuration is for instance done in the rect-native and cordova implementations of our SDKs.

Setting the application notification mode

After registering a listener for each mode (or required mode), an EnforcedNotificationMode must be set.

Those are the possible EnforcedNotificationMode :

  • NONE no notification will appear
  • FULLSCREEN_INCOMING_CALL only full screen invitations will be used
  • OVERHEAD_INCOMING_CALL only small notifications will be used
  • MIXED_INCOMING_CALL a full screen invitations will be used, if not possible (filtered), a small notifications will be used
    VoxeetSDK.notification().setEnforcedNotificationMode(@NonNull EnforcedNotificationMode newMode);

Adding filters

It is possible to add specific filters to prevent a NotificationMode to be used on a specific platform or android version. Such filters can be registered using register(@NonNull NotificationMode notificationMode, @NonNull VersionFilter filter)

    //for instance
    //add filter to exclude fullscreen from Android Q
    NotificationCenterFactory.instance.register(NotificationMode.FULLSCREEN_INCOMING_CALL, new VersionFilter(VersionFilter.ALL, 29));

FullScreenActivity

with the aforementionned uxkit plugin

With the given plugin, the IncomingFullScreen class will do the following :

  • if the AndroidManifest contains the voxeet_incoming_class metadata, it will start it
  • fallback to start the given class if the previous metadata does not exists
<application>
    <metadata
        android:name="voxeet_incoming_class"
        android:value="com.acme.invitation.InvitationReceivedActivity" />
</application>
        NotificationCenterFactory.instance.register(NotificationMode.FULLSCREEN_INCOMING_CALL, new IncomingFullScreen(DefaultIncomingCallActivity.class));

Overhead Notification

with the aforementionned uxkit plugin

With the given plugin, the IncomingNotification must be used with the AndroidManifest contains the voxeet_incoming_class metadata.

<application>
    <metadata
        android:name="voxeet_incoming_class"
        android:value="com.acme.invitation.InvitationReceivedActivity" />
</application>
        NotificationCenterFactory.instance.register(NotificationMode.OVERHEAD_INCOMING_CALL, new IncomingNotification());

Record / Replay a conference

Perform the steps below to record or replay a conference.

Recording a conference

During a conference, every participant can record it.

  • Use thestart method available in the RecordingService to start recording.
  • Use the stop method available in the RecordingService to stop recording.

Replaying a conference

Every recorded conference can be replayed. If you create more than one record during a conference, all of them are combined and replayed, one after another.

Use the replay method available in the ConferenceService to replay a conference.

This method uses:

  • any previously created and valid conferenceId (not a conferenceAlias)
  • offset representing the timestamp offset informing where the replaying should start
  • options referring to JoinOptions

Note: While replaying a conference, the user automatically joins it.

Returns

To check if your code works correctly, use the Promise<Error> command.