Doubts the SendBird API to create a chat

0

Good evening guys,

I'm doing a little project and I'm using the SendBird API to create a chat, but I'm having problems receiving the message that was sent from one user to another, could they help me? Here is the code to receive the message

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();

        //passa o token de conexão para o programa
        SendBirdClient.Init(APP_ID);

        //esse 1 é o id do usuário que está cadastrado na minha deshboard
        SendBirdClient.Connect("1", (User user, SendBirdException e) =>
        {
            if (e != null)
            {
                // Error
                return;
            }
            else
            {
                //Receber mensagens
                GroupChannel.GetChannel("sendbird_group_channel_67663307_ced62c9c4460ceb0db9d26297e2528617d883552", (GroupChannel groupChannel, SendBirdException ex3) =>
                {
                    if (e != null)
                    {
                        // Error!
                        return;
                    }

                    // Successfully fetched the channel.
                    // Do something with groupChannel.
                    else
                    {
                        SendBirdClient.ChannelHandler ch = new SendBirdClient.ChannelHandler();
                        ch.OnMessageReceived = (BaseChannel baseChannel, BaseMessage baseMessage) =>
                        {
                            // Received a chat message

                        };
                        SendBirdClient.AddChannelHandler(UNIQUE_HANDLER_ID, ch);
                    }
                });

            }
        });
    }
}
    
asked by anonymous 23.06.2018 / 23:57

0 answers