tags:

views:

283

answers:

4

is it possible to generate a call or an sms from an application that we create for iphone? Also is it possible to record a call???

+5  A: 

See the Apple URL Scheme Reference. What you want is:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:1-305-555-1212"]];

and

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:1-305-555-1212"]];

Unfortunately, there is currently no way to specify the text of an SMS.

As for recording calls, take a look at the Recording Audio section of the Audio Queue Services Programming Guide. I'm not sure if this functionality is disabled when a phone call is taking place, and at the very least you will have to open the application to record the audio (i.e., you won't be able to automatically record the audio). You should also look into the legality of recording phone calls and any consent requirements for the areas you wish to use/offer your application.

Martin Gordon
are you sure that we can generate calls form the application legally?? or this code is for jailbroken phones??
Nithin
@Nithin: plenty of apps in the app store can generate phone calls. See one of the dozens of restaurant review apps for an example.
Michael Petrotta
can we test this in a simulator?
Nithin
You won't be able to test in the simulator as it neither has the Phone or SMS apps. If you try it, you will get an alert notifying you of the fact, as stated in the first linked page.
Martin Gordon
I second that you can generate calls, I do it in my app. It does nothing in simulator, so test it on actual device.
bentford
A: 

Hi Friends,

Is it possible to get back to our app, once the call is made and completed and can we use the app from the stage where we went for call?

Krishnan
A: 

Is it possible to get back to our app, once the call is made and completed and can we use the app from the stage where we went for call?

@Krishna : This happens by default , if you are working on your app and you get a call your app pauses, after the call is dismissed the application will be resumed.

RVN
A: 

Hi, I have to make a calling application. I found a method to make a call on iPhone which is as follows: [[UIApplication sharedApplication] openURL:[NSURL RLWithString:@"tel://8005551212"]]; My question is, this method calls iPhone built-in application. I want to make direct call without using this built-in application. Are there other ways to make a call on iPhone programaticaly? I just want to by pass the Dial Application.

Another question, is there any way to clear call history from iPhone. ???? Please help me to solve this issue..