//public override void DidBegin(CXProvider provider) //{ // //base.DidBegin(provider); //} //public override bool ExecuteTransaction(CXProvider provider, CXTransaction transaction) //{ // //return base.ExecuteTransaction(provider, transaction); //} #endregion #region Public Methods public void ReportIncomingCall(NSUuid uuid, string handle) { Console.WriteLine("CXProviderDelegate: ReportIncomingCall "); // Create update to describe the incoming call and caller var update = new CXCallUpdate(); update.RemoteHandle = new CXHandle(CXHandleType.Generic, handle); //update.RemoteHandle = new CXHandle(CXHandleType.PhoneNumber, handle); //update.RemoteHandle = new CXHandle(CXHandleType.EmailAddress, handle); // Report incoming call to system Provider.ReportNewIncomingCall(uuid, update, (error) => { // Was the call accepted if (error == null) { // Yes, report to call manager CallManager.Calls.Add(new ActiveCall(uuid, handle, false)); } else { // Report error to user here Console.WriteLine("Error: {0}", error); } }); }
public void ReportIncomingCall(NSUuid uuid, string handle) { // Create update to describe the incoming call and caller var update = new CXCallUpdate { RemoteHandle = new CXHandle(CXHandleType.Generic, handle) }; // Report incoming call to system Provider.ReportNewIncomingCall(uuid, update, (error) => { // Was the call accepted if (error == null) { // Yes, report to call manager CallManager.Calls.Add(new ActiveCall(uuid, handle, false)); } else { // Report error to user here if (error.Code == (int)CXErrorCodeIncomingCallError.CallUuidAlreadyExists) { // Handle duplicate call ID } else if (error.Code == (int)CXErrorCodeIncomingCallError.FilteredByBlockList) { // Handle call from blocked user } else if (error.Code == (int)CXErrorCodeIncomingCallError.FilteredByDoNotDisturb) { // Handle call while in do-not-disturb mode } else { // Handle unknown error } Console.WriteLine("Error: {0}", error); } }); }
public virtual void ReportNewIncomingCall(NSUuid uuid, CXCallUpdate update, Action <NSError> completion) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);
public virtual Task ReportNewIncomingCallAsync(NSUuid uuid, CXCallUpdate update) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);
public virtual void ReportCall(NSUuid uuid, CXCallUpdate update) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);