/// <summary> /// Registers for and monitors the call state change event /// Fires a delegate event to let others registered know to update their UI /// </summary> private void MonitorCallState() { PhoneCallManager.CallStateChanged += (o, args) => { doesPhoneCallExist = PhoneCallManager.IsCallActive || PhoneCallManager.IsCallIncoming; ActivePhoneCallStateChanged?.Invoke(); }; }
private void MonitorCallState() { try { PhoneCallManager.CallStateChanged += (o, args) => { DoesPhoneCallExist = PhoneCallManager.IsCallActive || PhoneCallManager.IsCallIncoming; ActivePhoneCallStateChanged?.Invoke(); }; } catch (Exception e) { Debug.WriteLine(e); } }