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");
         }
     });
 }
 public void RefuseInvitation(AgoraRtmRemoteInvitation invitation)
 {
     CallKitManager.RefuseRemoteInvitation(invitation, (result) =>
     {
         if (result == AgoraRtmInvitationApiCallErrorCode.Ok)
         {
             Console.WriteLine("Invitation refuse");
         }
         else
         {
             Console.WriteLine("Invitation refuse error. Try again");
         }
     });
 }
        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);
        }
 public override void RemoteInvitationRefused(AgoraRtmCallKit callKit, AgoraRtmRemoteInvitation remoteInvitation)
 {
     Console.WriteLine("Refuse remote invitation");
 }
 public override void RemoteInvitationFailure(AgoraRtmCallKit callKit, AgoraRtmRemoteInvitation remoteInvitation, AgoraRtmRemoteInvitationErrorCode errorCode)
 {
     Console.WriteLine("Failure remote invitation");
 }
 public override void RemoteInvitationCanceled(AgoraRtmCallKit callKit, AgoraRtmRemoteInvitation remoteInvitation)
 {
     Console.WriteLine("Canceled remote invitation");
 }
 public override void RemoteInvitationAccepted(AgoraRtmCallKit callKit, AgoraRtmRemoteInvitation remoteInvitation)
 {
     ViewController.PerformSegue("peerToChat", NSObject.FromObject(remoteInvitation.CallerId));
 }