Generate a call, sms, etc from iphone

我与影子孤独终老i 提交于 2019-12-23 09:32: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???


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/1988070/generate-a-call-sms-etc-from-iphone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!