Vidz
Vidz

Reputation: 416

Apple ios API - Telephony

Can I listen to incoming call from my application and originate new calls? May I know the listener for call receiver? At high level, I see there are no API's to do the same.

Upvotes: 0

Views: 541

Answers (2)

Salman Zaidi
Salman Zaidi

Reputation: 9842

Can I listen to incoming call from my application

Yes you can detect incoming call using Core Telephony Framework if your app is running on foreground. For background detection you may use CTCallCenter. CTCallCenter can tell you about any in-progress or started calls.

However, you can't information about the caller

originate new calls?

You can not modify, reject, accept incoming call from your application, however to generate new call, you can use following code:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"telPrompt:%@", cellNumberString]]];

This will open call screen of your device with number already entered but will not originate calls.

Apple doesn't allow apps to originate/modify/accept/reject calls. Users do that by themselves.

Upvotes: 1

Raptor
Raptor

Reputation: 54212

No. You can't.

iOS does not allow to "replace" the functionality of Phone app. However, you can trigger Phone app to make phone calls by tel:// or telprompt:// custom URL scheme.

Upvotes: 0

Related Questions