Is there a way to get the call status back after a call is made from an app. I am using following to make a call
NSUrl url = new NSUrl("tel://" + phoneStr);
UIApplication.SharedApplication.OpenUrl(url);
It shows a pop up with "Cancel" and "Call" button. If user cancels it stays back in the app, if user clicks call it initiates a call. I would like to get the click action if user made a call or canceled it. Is there a way to get that status
On iOS 10+ We can use
CXCallObserver
to capture the event when user make a phone call like:Implement the delegate for
CXCallObserver
:But unfortunately, it will not fire when user click cancel.
After user click the button(cancel or call), the app will fire
DidBecomeActiveNotification
, so I recommend you create a delay method whenDidBecomeActiveNotification
fires. Then we can detect which button user clicks:In early time we can define a field
bool isDialing = false
, ifCallChanged()
fires set it true. At last we can detect the field indetectCalling();
.