public void CallEndedEvent(CTCall call) { if (TelephoneManager.IsListening && call.CallState == "CTCallStateDisconnected") { TelephoneManager.IsListening = false; CoreDependencyService.SendViewModelMessage(TelephoneManager.CallBackKey, true); } }
private bool ContainsCall(CTCall call) { lock (_calls) foreach (CTCall c in _calls) if (c.CallID == call.CallID && c.CallState == call.CallState) return true; return false; }
private bool ContainsCall(CTCall call) { lock (_calls) foreach (CTCall c in _calls) { if (c.CallID == call.CallID && c.CallState == call.CallState) { return(true); } } return(false); }
private void CallEvent(CTCall inCTCall) { if (!HeadphonesConnected && RVM.IsRecording) { if (inCTCall.CallState == "CTCallStateDialing" || inCTCall.CallState == "CTCallStateIncoming" || inCTCall.CallState == "CTCallStateConnected") { RVM.StopRecordingCommand.Execute(null); } else if (inCTCall.CallState == "CTCallStateDisconnected") { RVM.StartRecordingCommand.Execute(null); } } }
private void CallEvent (CTCall inCTCall) { MonoTouch.CoreFoundation.DispatchQueue.MainQueue.DispatchSync (() => { NSSet calls = callCenter.CurrentCalls; calls = callCenter.CurrentCalls; if (calls == null) { this.calls = new CTCall [0]; } else { this.calls = calls.ToArray<CTCall> (); } Array.Sort (this.calls, (CTCall a, CTCall b) => { return string.Compare (a.CallID, b.CallID); }); TableView.ReloadData (); }); }
private void CallEvent(CTCall inCTCall) { CoreFoundation.DispatchQueue.MainQueue.DispatchSync(() => { NSSet calls = callCenter.CurrentCalls; calls = callCenter.CurrentCalls; if (calls == null) { this.calls = new CTCall [0]; } else { this.calls = calls.ToArray <CTCall> (); } Array.Sort(this.calls, (CTCall a, CTCall b) => { return(string.Compare(a.CallID, b.CallID)); }); TableView.ReloadData(); }); }
public void CallEvent(CTCall call) { if (call.CallState == call.StateConnected) { ; } // TODO: disconnect if talking without headphones if (call.CallState == call.StateDialing) { ; } // TODO: disconnect if calling without headphones if (call.CallState == call.StateDisconnected) { ; } // TODO: reconnect if disconnected for call if (call.CallState == call.StateIncoming) { ; } // TODO: nothing? }