Mesibo Group Management - Creating a Group

You can create a new group by calling createGroup API. It will send a request to the server to create a new group. When a group is created, Mesibo_onGroupCreated callback function in the listener will be called with the group profile. You can then add members to the group using group profile APIs. Note that, you will be already added as the owner and the member of the group and hence you should not add yourself again.

boolean createGroup(MesiboGroupSettings settings, GroupListener listener)

boolean createGroup(String name, long flags, GroupListener listener)

createGroup takes the following parameters:

ParameterDescription
settingsGroup settings object
nameName of the group
flagsGroup flags, you can pass 0 unless you have specific requirements as mentioned below
listenerlistener which will be called when group is created (explained later). Note that, if you are using Javascript, you can pass listener or a callback function. For all other platforms, it is the listener.

Group settings class MesiboGroupSettings has following members:

MemberDescription
nameName of the group
flagsGroup flags, you can pass 0 unless you have specific requirements as mentioned below
callFlagsGroup Call Flags, default 0
videoResolutionGroup Call video resolution, default MESIBO_RESOLUTION_DEFAULT
callDurationMaximum call duration, default 0 for no restrictions on the call duration
listenerlistener which will be called when group is created (explained later). Note that, if you are using Javascript, you can pass listener or a callback function. For all other platforms, it is the listener.

Group Flags can be a logical OR combination of one or more flags value below:

FlagDescription
0Normal group, only members can send and receive, and participate in the conference
MESIBO_GROUPFLAG_SENDBYSELECTEDOnly selected members can send (refer add members API below)
MESIBO_GROUPFLAG_SENDBYANYONEAnyone can send
MESIBO_GROUPFLAG_RECVBYSELECTEDOnly selected members can receive (refer add members API below)
MESIBO_GROUPFLAG_RECVROUNDROBINReceived by one member in the round-robin fashion
MESIBO_GROUPFLAG_NOSTORAGEDo no store group messages
MESIBO_GROUPFLAG_PUBBYSELECTEDOnly selected members can publish their streams (video/audio) to the conference (refer to the conference APIs to learn more)
MESIBO_GROUPFLAG_PUBBYANYONEAnyone can publish their streams to the conference (refer to the conference APIs to learn more)
MESIBO_GROUPFLAG_SUBBYSELECTEDOnly selected members can subscribe (view/listen) to streams in the conference (refer to the conference APIs to learn more)
MESIBO_GROUPFLAG_SUBBYANYONEAnyone can subscribe (view/listen) to streams in the conference (refer to the conference APIs to learn more)
MESIBO_GROUPFLAG_LISTBYSELECTEDOnly selected members can get the list of streams in the conference (refer to the conference APIs to learn more)
MESIBO_GROUPFLAG_LISTBYANYONEAnyone can get the list of streams in the conference (refer to the conference APIs to learn more)

In Java,

MesiboGroupProfile.GroupSettings settings = new MesiboGroupProfile.GroupSettings();
settings.name = "My Group";
settings.flags = 0;

Mesibo.createGroup(settings, this);

In Kotlin

var settings:MesiboGroupProfile.GroupSettings = MesiboGroupProfile.GroupSettings()
settings.name = "My Group"
settings.flags = 0

Mesibo.createGroup(settings, this)

In Objective-C,

MesiboGroupSettings *settings = [MesiboGroupSettings new];
settings.name = @"My Group";
settings.flags = 0;

[MesiboInstance createGroup:settings listener:self];

In Swift,

let settings:MesiboGroupSettings = MesiboGroupSettings();
settings.name = "My Group";
settings.flags = 0;

Mesibo.getInstance().createGroup(settings, listener: self)

In Javascript

var settings = {};
settings.name = "My Group";
settings.flags = 0;

Mesibo.createGroup(settings, function(p) {
});