Querying

Channels are queried from the context of the VoiceLayerClient.

Public Channels

To query the list of public channels:

client.getPublicChannels(page, pageSize);

or

client.getPublicChannels(page, pageSize, new VoiceLayerFetchCallback<PaginatedResponse<List<VoiceLayerChannel>>>() {
    @Override
    public void onFetchComplete(PaginatedResponse<List<VoiceLayerChannel>> response, VoiceLayerException exception) {
        List<VoiceLayerChannel> channels = response.getResult();
    }
});

Joined Channels

To query the list of channels the authenticated user has joined:

client.getChannels(page, pageSize);

or

client.getChannels(page, pageSize, new VoiceLayerFetchCallback<PaginatedResponse<List<VoiceLayerChannel>>>() {
    @Override
    public void onFetchComplete(PaginatedResponse<List<VoiceLayerChannel>> response, VoiceLayerException exception) {
        List<VoiceLayerChannel> channels = response.getResult();
    }
});

Invited Channels

To query the list of channels the authenticated user has been invited to:

client.getInvitedChannels(page, pageSize);

or

client.getInvitedChannels(page, pageSize, new VoiceLayerFetchCallback<PaginatedResponse<List<VoiceLayerChannel>>>() {
    @Override
    public void onFetchComplete(PaginatedResponse<List<VoiceLayerChannel>> response, VoiceLayerException exception) {

    }
});

Requested Channels

To query the list of channels the authenticated user has requested an invitation to:

client.getRequestedChannels(page, pageSize);

or

client.getRequestedChannels(page, pageSize, new VoiceLayerFetchCallback<PaginatedResponse<VoiceLayerChannel>>() {
    @Override
    public void onFetchComplete(PaginatedResponse<List<VoiceLayerChannel>> response, VoiceLayerException exception) {

    }
});