Sunday, February 01, 2009

How to deal with the lack of background apps on the iPhone?

In a previous post, I had mentioned 'Background Applications' as one of the five requirements of a mobile development platform. But alas, the iPhone doesnt support it (yet). Apple is working on a push based notification system  and announced  beta versions to some select developers. (See http://gizmodo.com/5031559/iphone-developers-get-push-notification-api  and http://www.appleinsider.com/articles/08/07/31/apple_seeds_developer_tools_for_background_conscious_iphone_apps.html)
But what until then? This is the best I could come up with:
1) Send a calendar invite to the users' installed exchange email address. Email and calendar (and the ActiveSync client) run in the background. Just make sure that the meeting time is just a few minutes into the future. Remember to set a reminder.
2) The user will have the phone beep as a calendar reminder.
3) If the user notices and unlocks there is a good chance she can be notified that there is something important waiting for her in your app.

Very clumsy. To make matters worse, the links dont work on the iPhone calendar.

Does anyone else have any other ideas?

1 comment:

Mark said...

If you develop for jailbroken iPhones then you can run in the background. There's also an app called Backgrounder which lets existing apps run in the background.

Still, the right solution is for Apple to add support for this to their SDK. Some sort of event-based mechanism where your app can be notified when timers expire, data comes in from the network, etc. would seem the obvious solution. (Just polling in the background all the time will chew up your battery)