0

is there a way for an application to be notified when a mail arrives in the standard mail app?

To be more precise, I would like to write an app which is able to read an incoming email from the standard mail app containing a new contact or event in a custom .txt format. Then, the app should add this new contact/event to the ipad. And also viceversa: if a user modifies a contact, my app should be notified and it should be able to compose a new email containing the modified contact information and send this email to a back-end.

Is there a way to achieve this? In particular, I would like to know if my app could be notified when new email arrives.

I did a lot of search on the web but it seems there is no standard framework or notification mechanism to achieve this.

Cœur
  • 37,241
  • 25
  • 195
  • 267

2 Answers2

0

No, it's not possible. There's not really even a work-around that I can suggest (short of buidling your own mail client).

Stephen Darlington
  • 51,577
  • 12
  • 107
  • 152
0

You can simply do it with 'pull' mechanism, in your application check for new emails on the server with specified interval, if a new email arrives, say with predefined title you can fetch it and process it in your application. Not sure about the libraries available for the IPad/iPhone development but that should be possible.

Kris
  • 5,714
  • 2
  • 27
  • 47
  • Hi, thank you for your reply. However, I think this is not possible, because my app should verify the server at periodic time interval and unfortunately this is not possible in iOS because a process can run in background only for a limited amount of time. – user1168915 Jan 25 '12 at 16:06