Creating

Channels are created from the context of the VoiceLayerClient.

Channel

To create a new channel first determine the set of VoiceLayerChannelTrait for the channel:

EnumSet<VoiceLayerChannel.VoiceLayerChannelTrait> traits = EnumSet.of(
    VoiceLayerChannel.VoiceLayerChannelTrait.BROADCAST, // Mark the channel as a broadcast channel
    VoiceLayerChannel.VoiceLayerChannelTrait.PUBLIC, // Mark the channel as pulic
    VoiceLayerChannel.VoiceLayerChannelTrait.MANAGED // Mark the channel as managed by the admin
);

then create the channel:

VoiceLayerChannel channel = client.createChannel("channel_name", traits);

or

client.createChannel("channel_name", traits, new VoiceLayerCreateCallback<VoiceLayerChannel>() {
    @Override
    public void onCreateComplete(VoiceLayerChannel channel, VoiceLayerException exception) {

    }
});

Direct Channel

To create a direct channel between the authenticated user and another user:

VoiceLayerChannel channel = client.createDirectChannel(otherUser);

or

client.createDirectChannel(otherUser, new VoiceLayerCreateCallback<VoiceLayerChannel>() {
    @Override
    public void onCreateComplete(VoiceLayerChannel channel, VoiceLayerException exception) {

    }
});