What are the main differences between Android and iPhone implementations of application multitasking?

What are the main differences between Android and iPhone implementations of multitasking at the application level?

(Let's not turn this into a subjective fanboy argument please?)

Topic multitasking ios android

Category Android


As far as I can tell.

The iPhone multitasking is much more restricted. The multitasked activity must be one of the following:

  • Background audio
  • VoIP
  • Background location
  • Push notifications
  • Local notifications
  • Task completion
  • Fast app switching

[Thanks Gizmodo!]

Android, on the other hand, allows for true multitasking in a similar way to a PC.

Before I get accused of being an Android fanboi, let me explain something. The iPhone multitasking model is more than sufficient for most situations and avoids a lot of the problems (ie memory shortages) that accompany the Android system.


This is not an answer to your question, but it's worth clarifying that both operating systems are fully multitasking [1] under the hood (insofar as they can and do run multiple processes).

Your question is clearly about application-level multitasking ("can I leave one application running while using another?"), which is a relatively new use of the term, and isn't always well-defined, even if it does have some obvious examples (like listening to Pandora while reading email). Specifically, many applications don't need to run in the background in order to present themselves to the user as if they had never stopped running, so long as they save/restore their state. Applications which must perform periodic operations (like checking mail or popping up alarms) don't need to run continuously in the background either; they can invoked occasionally by the OS. The big issue is usually applications which need constant CPU while in the background, like Pandora.

In general, Apple has worked much harder to discourage or prevent continuously-running background applications, whereas Android seems more open to it. But they are converging, as Apple allows apps like Pandora to run in the background and Android provides richer tools to discourage needless background tasks when polling or saved state would suffice.

[1] http://en.wikipedia.org/wiki/Computer_multitasking


Android has a different concept of application level multitasking than a PC. There is more of a disconnect between data, how to view the data, and how to operate on the data.

You can only have one app view open at a time, but the operation on the data can be going in the background. This makes it tough for application developers to make it feel like the desktop when switching between apps, quitting apps, and starting new apps. It sometimes feels impossible to kill an app, but it also sometimes feels like it is impossible to switch to one task and back again. It depends on how the app developer did it.

You can have as many background processes going at once, and they are scheduled like desktop apps. The Linux kernel will choose how to prioritize which ones get memory and CPU resources. When the phone decides it's out of memory, it will start killing things to make more memory. This is done differently than the way Linux or most other OSs normally behave.

The data of a program is always available. As long as the app has permissions to access the data, it is available. You don't need a service running in the background for it to be available.

Apple has very specific ways in which you can multitask. They are a subset of the ways that Android allows. Only specific types of apps can run in the background and they have to be specifically programmed to do so.

A desktop is very different from both of these things. Each application's view, data, and data processing logic are often locked together. I would say that WebOS, Symbian, and Maemo/Meego are examples of this on mobile devices. If an application does expose it's data and background processing to other "views", it will tend to be a very special application.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.