views:

152

answers:

2

I want to write a iPhone application, it needs to react to the onRing event (or whenever someone calls, regardless of their ring/vibrate settings).

Is this possible? Would my application have to be running all the time or can it just run during a ring? (it is a light application, not sure how long it will take to load up though).

I basically want to react to a ring, and then determine whether to ring or vibrate.

+1  A: 

This is not possible unless you have a jailbroken phone.

Geoffrey Chetwood
+1  A: 

If your application is currently running when the call comes in, you'll receive the notification UIApplicationWillResignActiveNotification indicating that the app will go offscreen and be replaced by the call screen.

I think that's the only way you can do it without a jailbroken phone, though.

Ben Gotow
Even then, all you get is a notification, so that you can save the state of your app or something, you can't stop it, modify it or do anything else with it.
Jasarien