Multitasking in iPhone OS 4 – A Detailed Summary
Multitasking in the iPhone has been the much talked about problem right from the very start of the iPhone business. With all the other similar Smartphone devices having this facility iPhone lacked behind by a huge margin. But with the release of OS 4.0, Apple has silenced all the critics that were hell bent on giving a piece of their mind on every single opportunity they got.
When you want to switch between applications, double tap on the Home button, you get a dock-strip where all the running apps are listed. Click to switch on to that application. The phone displays four apps by default and if there are more apps running at that time then you can switch towards left and reach them. If you want to switch to some other app while playing a game, it will be paused and will resume when you return.
Apple, as always, has big claims at the launch and this time it has been claimed that their service for multitasking is going to be better than the others, just as was the case with ‘copy-paste.’ The new OS has been given the responsibility to manage the battery life for a better performance as opposed to the other devices where the applications have to manage the battery consumption. This way there is uniformity in the usage and performance. Having a close look at the services that were required in the background to support multitasking did this. They were identified and separate code was written for it and then was supplied to the developers in the form of APIs.
These APIs are as follows:
Audio:
Now you can listen to audio as well while working on other apps. Switching from one to another will be by a tap on the Home button. This will activate the Pandora controls if it is running in the background just like iPod controls were activated earlier. But at this point in time its not clear if the playback controls will be available or you will have to go to the app to change them.
Voice over IP:
Now you can receive Skype calls even when you are doing something else or if the phone is locked or even when the app is not in the foreground. This can be done by a pop-up box that appears on the screen when you get a call and you can attend it with just a tap on it.
Location services:
Now you can get directions even when you are doing something else at the same time. Apple uses cell phone location information to give you the notifications on directions. When a user switches cell phone towers, it can indicate to the service that location has changed. For keeping this private and safe there is an option that appears on the Home page from where you can get notifications if any application has requested for your location information in the last 24 hours.
Push notifications:
The iPhone’s existing Push Notifications API, introduced in iPhone 3.0, is one available to developers that already runs in the background.
Task completion:
If there is an app running in the background, then this API will let it finish the work and then will switch it off. Meanwhile you can start doing some other work as well or even lock the phone. This becomes a good time saver.
Fast App Switching:
This is the one for battery consumption. When you switch from one app that one would go into a sleep mode where it freezes to the point where you left. When you return, it will start right at the same point conserving the battery to the maximum.