Reputation: 5667
I am trying to make an app, which should come into picture (each & every time) as soon as the user is done with his/her phone call.
Use case:
"My app" is currently not running.
I have seen tasks running in background foreground but how to invoke App after each phone call.
Thanks..
Upvotes: 1
Views: 1584
Reputation: 73588
You cannot do this. Quite simply iOS does not (yet) have any such feature where your app would be triggered based on some system event.
But you can explore some alternatives when a call comes when your app is running.
If your app is running when the call comes
It might be possible to sign up to receive notifications (using UINotificationCenter
calls) from UITelephony
.
However, if you're actively using your app when the phone call starts, it will call -(void)applicationWillEnterForeground
when the call is finished. As for differentiating a phone call end versus just a regular return to phone call, I don't know. But it's a start.
If your application is running while a call is in place CoreTelephony Framework provides call states. CTCall
class provides information about the call states. I have not used this myself but you may find it useful.
extern NSString const *CTCallStateDialing;
extern NSString const *CTCallStateIncoming;
extern NSString const *CTCallStateConnected;
extern NSString const *CTCallStateDisconnected;
Upvotes: 3
Reputation: 12329
No, its not possible to fetch Call/SMS/Email logs in iOS 5 and later.
You can do this in jailbroke
any ways if you are trying to achieve this in iOS 4, I have a useful information HERE
Upvotes: 1
Reputation: 2104
It is not possible in iOS till now if the device is not jailbroken.
iOS doesn't allows any app to intercept working of any other application.
Upvotes: 0