Apple’s Senior Vice President of iPhone software Scott Forstall explained how the company was able to add multitasking while preserving battery life and avoiding major slow downs: iPhone 4 will add seven different multitasking services APIs for developers, each tuned to solve different multitasking scenarios.
1. Background Audio, demonstrated by Pandora’s Internet radio streaming app, will allow apps like it to play music in the background, with iPod-like playback controls available even at the lock screen.
2. Voice over IP enables apps like Skype to continue to receive calls even when the calling app is not the foreground app. A doubled status bar is added to get back to the call while allowing the user to launch other apps. This feature, among other things, potentially enables the iPad to make “regular” phone calls through Skype.
3. Background Location 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 — the advantage is that TomTom will be able to keep getting you directions even if you accidentally (or intentionally) close the app.
4+5. Push Notifications and Local Notifications. Apple’s existing push notification service get augmented by a new “local notifications” service that allows apps to post reminders or other events without using Apple’s servers.
6. Task Completion will enable an app to start a job and continue working on it after the user leaves the app. The example given cited an app posting photos to Flicker, which continued working after the user left that app.
7. Fast App Switching “allows you to restore the state of an app when you switch out and back”. This is what Apple expects all developers to adopt at the very least: it allows to freeze the progress of an app such as a game while the user handles another task in another app, and to get back exactly where the user left off when the user switches back to the app.