private void CallRts() { NIM.NIMRts.RtsStartInfo info = new NIM.NIMRts.RtsStartInfo(); info.ApnsText = "123"; info.CustomInfo = "456"; RtsAPI.SetAckNotifyCallback(AckNotifyCallback); RtsAPI.Start(_channelType, _peerId, info, StartResCallback); }
public void RtsTest() { NIM.NIMRts.RtsStartInfo info = new NIM.NIMRts.RtsStartInfo(); info.ApnsText = "123"; info.CustomInfo = "456"; RtsAPI.SetAckNotifyCallback((a, b, c, d) => { this.InvokeOnMainThread(() => { if (!c) { MessageBox.Show("对方拒绝"); } else { RtsForm f = new RtsForm(a); f.Show(); } }); }); RtsAPI.Start((NIM.NIMRts.NIMRtsChannelType.kNIMRtsChannelTypeTcp | NIM.NIMRts.NIMRtsChannelType.kNIMRtsChannelTypeVchat), _peerId, info, (code, sessionId, channelType, uid) => { this.InvokeOnMainThread(() => { if (code == 200) { MessageBox.Show("邀请已发送,等待对方加入"); } else { MessageBox.Show("邀请失败:" + ((NIM.ResponseCode)code).ToString()); } }); }); }