iPhone is about to get multitasking which is the best among all the other multitasking on Mobile devices, said Apple. Until it’s rolled out for public use and iPhone developers start developing for OS 4, we can’t say if they have really nailed it that hard to be called ‘The Best!’.
If you are an iPhone developer planning to make best use of the multitasking feature offered by iPhone OS 4 , here is a simple explanation of the seven service APIs that you have in your arsenal.
Background Audio: iPhone’s iPod App very much runs in background. You can listen to your music via iPod App while surfing the Web on Safari.
But what if I want to use a third party App (like Yahoo music or Pandora) to listen to music while I surf the web on Safari?
Well, till now this wasn’t possible as iPhone never had a support for multitasking. But with iPhone OS 4 you will be able to listen to music via third party apps while surfing the web. Not only this, you can even have iPod controls when the screen is locked, same as we get if iPod is playing the music in background.
Background VoIP: Of course, this was something which was very much needed for the iPhone users. While you are talking to anyone through any VoIP service via their App on iPhone you can’t leave an App to check out your email because that app won’t run in background & as a result you lose the connection. So, through this service API the iPhone can now run any VoIP service App in background on iPhone OS 4. Upon making the app work in background, users can see the conversation notification bar on the top of the screen of iPhone.
Skype is probably the first one to use this service API and demonstrated their App at preview event.
Background Location: If you might have used Google Latitude on Symbian or Android devices you might have noticed that when you let your app run in background, that app keep tracking your location and keep your family and friends updated in your network. But this wasn’t the case with iPhone at all, as it never had a support for multitasking. Whenever you quit your geo-location tracking App, it’s no more running, as a result it can’t update your friends and family in your network.
Making use of these API now you can make your App run in background to keep tracking your location. If an app is running in background tracking your location, you can see a location marker in status bar so that you get to know you’ve been tracked by some application. You can even find which app has used location services in last 24 hours in the Settings menu.
Push Notifications: This is the same notification system which was integrated into iPhone OS 3.0. No changed spotted yet.
Local Notifications: This notification system is different and is completely an offline implementation. For an example consider Alarm Clock. Till now, if the user wanted to use any third party app for reminder or wake up alarm, they just couldn’t find a proper solution to this, because, third party apps can’t run in background and hence can’t notify the user at a given time. Through this service API you can easily notify user at any given time. So, users can now find some great timepieces in AppStore which can remind / notify user at any given time.
Fast App Switching: This API gives an app an ability to save the current session before responding to any other. It saves the session where you left it and when the user returns to an app, the app resumes the session where the user left it.
Tap Tap seems to be the first game using this service API.
Task completion: These services will give the ability to complete some task in background. For an example, if you’re uploading your photos to Flickr via a Flickr App, you just can’t quit an App before the whole task ends. However through this service API Flickr can upload the photos in the background.
This Flickr app was also demoed at iPhone OS 4 preview event.
