Multitasking In For iPhone 4.0?
The latest word on the iPhone is that the 4.0 OS will finally have
honest-to-goodness multitasking. This could hopefully lead to things like a real chat client, and dangerous battery consumption. I still hope it's true.
The iPhone OS has always had real pre-emptive multitasking. The phone, email, iPod, calendar, and other applications run all the time and can do things simultaneously.
Multitasking just hasn't ever been made available to 3rd party developers.
It has never been a technical limitation in the OS. Rather, Apple kept control over it for battery life and security reasons.
First against the wall when the revolution comes
Well if multi tasking is implemented as a series of call backs so that any process that is waiting on data is not consuming clock cycles then there should be no more drain when "multitasking" then when running one application. I have never written anything in objective C but with most of my embedded c programming I am able to put any processes that is not doing anything to sleep, so it does not consume extra power.
As far as I can tell using the backgrounder on my jail broken iphone when not actively working most programs still consume cycles. So almost all of this could be fixed if the wait() call is not properly implemented in the lib.
As an iPhone developer, I can tell you this just isn't coming. Apple has lots of (NDA'd) guidelines about how much CPU juice you get (since iPod etc can work through your app) and this would seriously topsy turvey the existing software base. They have gone out of their way to make a UI that works well without multitasking, and stuff like APNS was engineer specifically not to require it.
Aside from having my SSH sessions die when I want to goto an email or phone call, multi tasking has never actually been lacking.
There are real uses for multitasking, which the iPhone already does - like listening to iPod while surfing or the like. Maybe chat as mentioned, but I also hope to set which apps can be multitasking - I don't trust the developers always to make the correct call - there is no reason to leave a game running in the background while I surf, it would be better to save state.
Good point. The major reason that I look forward to multi-tasking is that I believe it to be a requirement for true VPN applications. It would be nice to be able to use my iPhone to VPN through our firewall at work so that I can handle emergency systems admin tasks.
Backgrounder's probably the single biggest reason I have mine jailbroken. I'm always amazed at the people freaking out like multitasking would cause the thing to explode. People have been multitasking on it for years now. I've had a couple issues with backgrounding and sound, but that's about it. For the most part it's worked great for me.
Everything will be taken away from you.
Very much incorrect. Most computer programs spend most of their time "sleeping" while they are not actively updating the display, receiving input from somewhere, or actively processing something. This is the standard non-realtime paradigm used for almost two decades in commodity computers. Did you ever notice that your CPU is not running "at 100%" all the time?
Brian Fundakowski Feldman
CPU usage guidelines that the developers don't know about are not guidelines.
"I still wouldn't switch from an Android to an iPhone because of the restrictions (and I'm not going to wager hundreds of dollars on a jailbreak), but now I see why people enjoy Apple products."
The current Jailbreaking method is actually very ease to implement and just as easy to undue.
Pretty much you download an EXE from blackra1n.com and then run it. Boom Jailbroken.
To undo the Jailbreak simple do a factory restore on phone from itunes.
There are more complex ways to do this, but the above method is pretty safe and simple. //cool story bro...
The OS kills any application after 5 seconds that does not end itself when told to quit. It has nothing to do with preventing 2 apps from running at the same time. Rather, it is because there is no provision to switch apps in the UI, so if the app didn't quit quickly, it would appear to hang the phone.
The only requirement on timing is that state must be saved quickly to avoid data loss when the watchdog kills the process.
For some time now, I have been able to listen to music and browse the web, text, chat, etc. by just switching apps.
Uh, you do know you can do that with a non-jailbroken iPhone, right? You didn't mention anything that a stock iPhone is incapable of doing so, if that's why you jailbroke your iPhone, you wasted your time... If there are other apps that you're running with backgrounder, fine, but that was a bad list of example tasks given the iPhone can do that out of the gate.
Apple's decision to not include multitasking from the start was likely a decision to keep things as simple as possible. Now they're playing catch-up and tacking on multi-tasking to a system that was built from the ground-up without it. I don't understand how this will not break app compatibility. Existing apps only understand certain "states." Multitasking will introduce new application states that existing apps will not know how to handle. I am very interested in how they plan to reconcile this.
iPhone OS is Unix. It's had multitasking built in from day one!
With Android you can look at exactly how much of your battery has been used by which apps. This is built in and you can look at it whenever you want. Whenever the battery life gets to 15% it will tell you to start charging it and ask if you want to see this report.
..except for the phone and iPod app which has had multitasking since launch.
I have jailbreakon my iPhone and installed "backgrounder" which allows any app to run in the background. Works great. The icon of an app gets a small circle to indicate that it is running in the background.
I do understand why Apple have blocked this functionality to developers since it drains battery.
I can't stand hearing everyone talk about multitasking on things like Android devices as though it works the same way as it does on their desktop PC. Nothing could be further from the truth.
The first form of multitasking on Android is that applications can elect to receive messages, e.g. "someone is calling", or "wifi state changed".
If you actually need to do constant work in the background (e.g., listening on a network port), you can do so as well, using a "service". And even services will be killed by the system if resources are needed.
No one is talking about running a Handbrake encode session, Firefox with a bunch of animated Flash ads, and a kernel compile at the same time on their phone.
Multitasking on a phone is being able to record breadcrumbs of a journey with a GPS app, listen to streaming internet radio, and receive notifications from an instant messaging client at the same time.
While I think that is true of every other smart phone on the Market, based on mobile browser statistics, the iPhone is the exception.
As a dedicated Android user (and programmer), I still don't see the value of multitasking in a mobile app. The runtime can automatically clean up and restart the application with all the state information necessary if it ceases to run anyway. It's a lot easier to just assume that it's _always_ going to be cleaned up upon suspension, instead of writing code that accounts for the possibility that the app just may be resuming from a paused, but not terminated state. I haven't used a single Android app, or written any code that I can say honestly benefits from the multitasking aspects of Android. The runtime can shut down my app any time it sees fit. Planning for resumption from an abruptly terminated app is the norm when developing for Android anyway. The way I see it, the apps would have more resources if the platform didn't have to multitask.