1

My app has a scenario like when the user make a call and if the call ends, then it should return back to my app, rather than the native phone app. I was able to achieve this by using

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://123456789"]];

but this seems to happen only when the call is successful and ended in its own way or manually. but this is not returning to my app when the call fails. I am badly looking forward for a solution for this.

Jamie Taylor
  • 4,709
  • 5
  • 44
  • 66
XiOS
  • 1,665
  • 2
  • 18
  • 22

2 Answers2

1

The telprompt:// is not officially supported, thus the when Apple decides to change or remove this scheme your app will not longer function.

Because it is not official there is also not documentation and you will not be able to influence the work of the scheme.

So no, there is no option to return back to your app when a call fails.

rckoenes
  • 69,092
  • 8
  • 134
  • 166
0

As far as my knowledge you cannot redirect to the iOS app after call ends . There are no apis . I too have tried a lot but no use . But you can handle the callstates in the app . It may be helpful to you . Use core telephony framework .

CTCallCenter *callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler=^(CTCall* call){
    if (call.callState == CTCallStateDisconnected)
    { 
        //handle disconnect
    }
};
SRI
  • 1,514
  • 21
  • 39
  • You might be able to send a `UILocalNotification` at most, but since your app needs to be running in the background to handle the `CTCallCenter` event this will not really work. – rckoenes Sep 12 '13 at 08:40
  • YOu are redirecting to call from the app so our app will remains in Background so it should work – SRI Sep 12 '13 at 09:08
  • Fine ernaidu, first of all thanks for replying so soon. And actually i need to know the way of handling that disconnect. i.e., once i find the call is disconnected/failed, i want to return back to my app and not to the default phone app on device. i was able to do this while the call ends but thats not working out when the call fails. so do you have any clue on this? – XiOS Sep 12 '13 at 09:08
  • @ernaidu even if you start the call your app will be suspended. – rckoenes Sep 12 '13 at 09:09
  • No it will be remains in background mode – SRI Sep 12 '13 at 09:10