Reputation: 1266
I have an application that can send a number to the iOS dialer using "telprompt://"
. After telprompt call iOS asks the user if he wants to dial the number and if he wants it makes the call. After the call my application becoms active (it comes in foreground). My question is if there is a way to handle that. I mean if i can execute a piece of code after returnin from call, not just after every becoming active? Something like applicationDidBecomeActive after dialer. In addtition is there a way to chech if user has answered the question with "No" (if the user do not want to call the number)?
Upvotes: 0
Views: 213
Reputation: 10127
You cannot check if the user denied calling, there is no delegate call for this.
To check whether the app was resumed after a call, you can introduce a BOOL
flag before the app is sent to background. In your applicationDidBecomeActive
you simply check if the flag is true, thus you know that the app was resumed after a phone call from within your app.
See also this question: How to detect if user actively relaunched the app by clicking the app icon?
Upvotes: 1