tags:

views:

42

answers:

1

Hi,

I have a requirement for Device 4.0 like, User dial a number from my app and then app should connect to that number. At the mean time I need a handler to keep track the stateChanges for the call(To do so I can use core telephony APIs).

So can any know how can a number be connected without a "tel" protocol.

Thanks in advance,

+2  A: 

I believe the only way to dial a number is to use tel:123123123 You could use CTCallCenter callEventHandler property so set an event handler and receive it if your app is active.

From the docs:

If your application is active when a call event takes place, the system dispatches the event to your handler immediately. However, call events can also take place while your application is suspended. While it is suspended, your application does not receive call events. When your application resumes the active state, it receives a single call event for each call that changed state—no matter how many state changes the call experienced while your application was suspended. The single call event sent to your handler, upon your application returning to the active state, describes the call’s state at that time.

BTW: There is no way to prevent your application to be suspended. The OS will suspend it without notification when memory is needed.

Hope it helps

nacho4d
Thanks! yeah well can you help me to find a idea for "Where the app dials a number, as soon as it connects the app should resume to active state."
AgentXXX