ios - Delegate to know when phone call ends which was initiated by app -


I have a code that makes a phone call using the code:

  / Make / Call on the given phone number - (zero) Callphone number: (NSString *) Phone number {if (! Self.webview) self.webview = [[UIWebView alloc] init]; Self.webview.delegate = self; // Remove non-digit from phone number Phone number = [[BCC] Inset deleted from [phone number components]: [[NSCRactorSat decimalDGCTECTSAT] InvertedSat]] componentJudgedbystrings string: @ ""]; // Make a call NSURL * url = [NSURL URLWithString: [NSString stringWithFormat: @ "tel:% @", phone number]]; [Self. WebWorld Load Request: [NSRR request request with url: url]]; [Self.view addSubview: self.webview]; }  

This calls. What do I want, I want to know where the user ends When the user ends the call, I have to do an operation. Is there any way for this?

Whatever I have tried, I have made the current controller a representative of the webview . But none of the representative methods is said to be.

  - (zero) webViewDidStartLoad: (UIWebView *) webView {DLog (@ "Loading Start"); } - (zero) webViewDidFinishLoad: (UIWebView *) webView {DLog (@ "Loading is finished"); } - (zero) webview: (UIWebView *) webView didFailLoadWithError: (NSError *) error {DLog (@ "error with error:% @", error); }  

I do not know that you need this information, but I use the webview so that the phone can be made, the flow within the app ends and the call ends, the app screen Instead of the user is coming into the app manually from the native contacts app.

core telephony frame with the code callEventHandler property

  @property (nonatomic, copy) zero (^ callEventHandler) (CTCall *);  

You have to define a handler block in your application and assign it to this property. If your application is active when a call event occurs, then the system immediately sends an event to your handler when the call is in position


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -