I need to know is there a way to call a phone number along with passing a image to display.... also if i could get the call duration, or set some notification for particular time....
One way is to call using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"tel://123456789"]];
but then my application would go in backgound , how to i call my application after phone call end...
What you are asking is almost not possible.
Im saying allmost because it might be posibbole to
add a temporary contact to the
address book with the phone number you want.
set its image to the image you want.
paste the call with the method you wrote.
but still there are 2 problems.
you will have somehow to delete the contact afterwords.
you can not do the things you asked from the background. and you can not do nothing when a call is active.
Related
I'm trying to begin a phone call from within my iPhone app (similar to several other questions already answered on SO), but with a specific wrinkle: my boss doesn't want the call to begin immediately. He wants the app to open the Phone app and autofill the number, but require the user to actually press the green button to begin the call.
Is this possible? All the research I've been doing has followed the...
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"tel://911"]];
...pattern, which begins the call automatically as soon as it switches over.
Is it possible to prep the call and autofill the number, but not actually begin the call automatically?
as far as i know that is not possible. one thing you could do is for example present an alert and ask the user explicitly if he / she wants to make the call.
The following code, if triggered by a button press in an app, presents the user with a UIAlertView giving them the option to "Cancel", and dismiss the UIAlertView, or "Call" and go through with dialing the number displayed to the user:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"telprompt://555-555-5555"]];
My question is: Is there a way to detect whether or not the user followed through with actually dialing the number? I am implementing Google "Analytics" in my app to see how users are interacting with it, and I can track when they tap the UIButton that calls the code above, but that doesn't necessarily mean they actually made the call.
Hopefully that makes sense. Thanks in advance for any help!
You won't be able to check the user dialed that specific number. But you will be able to check they dialed a number using CTCallCenter:setCallEventHandler:
If they made a call immediately after you present the view its 99.9% reasonable to assume it was that number.
But also your app delegate's willResignActive will get called if they place the call and get connected (I think, I can't remember exactly) so you could use that as an indication.
The app I'm working on makes calls when the user tells it to, using telprompt to come back to the app when the call is over. Is there any way to tell what caused the call to end? If the call failed, I'd like to do one thing, but if it succeeded and the user just hit "END" I want to do something else. I'm not seeing anything in the documentation about it, though.
TIA
Janene
My app allows the user to make a phone call but I need to hide the number I'm calling to because it has a secret code within it. Is there any way to achieve this?
When I say "hide the number", I mean the phone number that appears in the the confirmation UIAlertView before calling and, if possible, in navigation bar when the call is in process.
Most definitely not. The phone number that gets passed to the OS when making the call cannot be modified or hidden from the user. (What if your app dialed 911?)
Also, how is a "secret code" passed via a telephone number?
Are you using the native phone number recognition code within a web view, or is this a custom button in your app.
In an app I've created, I have a button that the user can tap to call a phone number. This button presents a UIAlertView that I create myself (and therefore have complete control over what it says), and then in the alertView:didClickButtonAtIndex: delegate method, I do:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"tel://5555555555"]];
to initiate the call.
I think if you try to modify the way how ios Phone app works, your app might be rejected. I'm almost sure they will not happy to let your app dail a number without user's knowledge.
I need to do a call in background to a number and, if is possible, to enter a code during the call. Can I do this?
This call must be done via user's phone!
in background? No. You can always use
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:#"tel:1234567890"]];
to make a call, but it will open the Phone app