protected override void OnResume()
        {
            base.OnResume();
            var mMessageChannelListQuery = SendBirdSDK.QueryMessagingList();

            mMessageChannelListQuery.OnResult += (sender, e) => {
                mSyncContext.Post(delegate {
                    mSendBirdMessagingChannelAdapter.Clear();
                    mSendBirdMessagingChannelAdapter.AddAll(e.MessagingChannels);
                    if (e.MessagingChannels.Count <= 0)
                    {
                        Toast.MakeText(this, "No messaging channels were found.", ToastLength.Short).Show();
                    }

                    mSendBirdMessagingChannelAdapter.NotifyDataSetChanged();

                    SendBirdSDK.Join("");
                    SendBirdSDK.Connect();
                }, null);
            };
            mMessageChannelListQuery.Excute();              // Excute Query
        }
コード例 #2
0
    void OpenMessagingList()
    {
        currentUserName = inputUserName.text;
        SendBirdSDK.Login(userId, currentUserName);

        mEventProcessor.QueueEvent(new Action(() => {
            messagingChannelListPanel.SetActive(true);
        }));
        mMessagingChannelListQuery           = SendBirdSDK.QueryMessagingList();
        mMessagingChannelListQuery.OnResult += (sender, e) => {
            if (e.Exception != null)
            {
                Debug.Log(e.Exception.StackTrace);
            }
            else
            {
                mMessagingChannelList = e.MessagingChannels;
                OnQueryMessagingChannelList(mMessagingChannelList);
            }
        };
        mMessagingChannelListQuery.Next();
    }