Generate a call, sms, etc from iphone

2019-06-19 05:40发布

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???

标签: iphone call
2条回答
我命由我不由天
2楼-- · 2019-06-19 06:14

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.

查看更多
ら.Afraid
3楼-- · 2019-06-19 06:36

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.

查看更多
登录 后发表回答