tags:

views:

53

answers:

1

Hi, How can I initiate a phone call within my application? And also, can block the incoming calls? And at times can receive the incoming calls?

Any idea?

+1  A: 

You can use the URL scheme: tel://14165551212 and it'll prompt the user to call that number. You cannot however, block a call from coming in.

jer
Ok thanks. And should I make sure than this URL is executed in a separate thread so that my main app is also accessible or it will be automatically taken care of?
Abhinav
There's no way to programmatically block an incoming call?
Fernando
Alright sir. Thanks.
Abhinav
@Abhinav, that URL will cause the app to pause no matter what when it prompts the user to dial it or cancel. The OS handles that and you can't do anything about it.
jer
@Fernando, No there isn't. When a call comes in, your app goes into an inactive state momentarily until after the call is answered or dismissed. (i.e., when the user is making up their mind to take the call or not.)
jer