Message Events

To handle message notifications register a VoiceLayerMessageEventListener with the VoiceLayerClient:

client.setMessageEventListener(new VoiceLayerMessageEventListener() {

    @Override
    public void onMessagePosted(VoiceLayerMessage message) {
        // Called when a new message is posted to a channel the authenticated user is associated with.
    }

    @Override
    public void onMessageUpdated(VoiceLayerMessage message) {
        // Called when an existing message is updated in a channel the authenticated user is associated with.
    }

    @Override
    public void onMessageRemoved(String messageId, VoiceLayerChannel channel) {
        // Called when an existing message is removed from a channel the authenticated user is associated with.
    }

});