コード例 #1
0
 public void AcceptInvitation(AgoraRtmRemoteInvitation invitation)
 {
     CallKitManager.AcceptRemoteInvitation(invitation, (result) =>
     {
         if (result == AgoraRtmInvitationApiCallErrorCode.Ok)
         {
             Console.WriteLine("Invitation accept");
         }
         else
         {
             Console.WriteLine("Invitation accept error. Try again");
         }
     });
 }
コード例 #2
0
        public override void RemoteInvitationReceived(AgoraRtmCallKit callKit, AgoraRtmRemoteInvitation remoteInvitation)
        {
            var config = new ConfirmConfig()
            {
                Message    = $"User {remoteInvitation.CallerId} sent invitation with Content: {remoteInvitation.Content}",
                Title      = "New invitation",
                OkText     = "Accept",
                CancelText = "Refuse",
            };

            config.OnAction += (result) =>
            {
                if (result)
                {
                    callKit.AcceptRemoteInvitation(remoteInvitation, null);
                }
                else
                {
                    callKit.RefuseRemoteInvitation(remoteInvitation, null);
                }
            };

            UserDialogs.Instance.Confirm(config);
        }