Due this summer, iPhone OS 4 will deliver multitasking as a way to run background apps that the user can quickly switch between.
The new feature was highlighted by Apple’s chief executive Steve Jobs as one of the top 7 “tent pole” features of the new release, along with 100 other user features and hundreds of new features for developers to leverage in their apps.
“”We weren’t the first to this party,” Jobs said of the new multitasking feature, “but we’re going to be the best. Just like cut and paste.”
The new feature enables users to launch multiple background apps, and then from any running app (or from the Home screen), call up a “multitasking tray” of the currently running apps, which the user can then immediately switch to.
Jobs demonstrated jumping back and forth between the iPhone’s Safari browser and Mail, then jumped into a running game to continue from the previous game.
How Multitasking works in iPhone 4.0
Apple’s Senior Vice President of iPhone software Scott Forstall appeared on stage to explain how the company had added multitasking without incurring a performance hit.
iPhone 4 will add seven different multitasking services for developers, each tuned to solve different multitasking scenarios. One, demonstrated by Pandora’s Internet radio streaming app, will allow apps like it to play music in the background, with playback controls available even at the lock screen.
A second example involves VoIP (Voice over IP), which enables apps like Skype to continue to receive calls even when it is not the foreground app.
A third mechanism is background location, which can be used by direction apps such as TomTom or social media apps like Loopt. Rather than constantly polling GPS (something that kills the battery rapidly) the new system calculates location from cellular sites
A fourth and fifth enhancement relates to Apple’s existing push notification service and a new “local notifications” service that allows apps to post reminders or other events without using Apple’s servers.
A sixth feature, task completion, will enable an app to start a job and continue working on it after the user leaves the app. And example given cited an app posting photos to Flicker, which continued working after the user left that app.
The seventh multitasking mechanism is fast app switching, which “allows you to restore the state of an app when you switch out and back,” is the easiest to implement, essentially freezing the progress of an app such as a game while the user handles another task in another app.