Documentation

Support

Vivox Unreal SDK

Vivox Unreal SDK

Send and receive group text messages

Learn how to send and receive text messages in channels.
Read time 1 minuteLast updated 2 days ago

If the game has joined the channel with text enabled, the user can send and receive group text messages. To send messages, the game uses the
IChannelSession::BeginSendText
method. When this SDK call is made, other users in that channel receive a
IChannelSession::EventTextMessageReceived
event.
The following code displays an example of the process for sending and receiving group text messages:
/* . . . */ChannelId Channel = ChannelId(kDefaultIssuer, "example_channel", kDefaultDomain);FString Message = TEXT("Example channel message."); IChannelSession::FOnBeginSendTextCompletedDelegate SendChannelMessageCallback;SendChannelMessageCallback.BindLambda([this, Channel, Message](VivoxCoreError Error){ if(VxErrorSuccess == Error) { UE_LOG(MyLog, Log, TEXT("Message sent to %s: %s\n"), *Channel.Name(), *Message); }});MyChannelSession.BeginSendText(Message, SendChannelMessageCallback);/* . . . */void OnChannelTextMessageReceived(const IChannelTextMessage &Message){ UE_LOG(MyLog, Log, TEXT("%s: %s\n"), *Message.Sender().Name(), *Message.Message());}

Send and receive group text messages • Vivox Unreal SDK • Unity Docs