Donate

Categories

Advert

XHTML

Valid XHTML 1.0 Transitional

Android Multitasking

My new Samsung Galaxy S3 has support for “Multi Window Mode”, here is a video which shows how to use this, Multi Window Mode starts at about 2:30 [1].

A common complaint about Android is the lack of multitasking, which is partly true and only slightly alleviated by Multi Window Mode.

Running Multiple Programs

Traditionally Android has multitasked with a similar ability to a Unix shell session, you can have applications running in the background and switch between them but you can’t see multiple applications running at the same time (apart from seeing notification messages at the top of the screen). The new Multi Window Mode allows two or more applications to share a screen. But it only applies to a small number of applications which support it, on my phone that is applications shipped by Samsung and Google Chrome. Also I can’t have multiple copies of Chrome open at the same time which means I can’t do the things that I do on every PC that runs Chromium (the non-Google build of Chrome).

I have not yet found a situation where Multi Window Mode has been useful to me, the applications I use for most tasks don’t support it.

So while Android being based on Linux does multitask really well in the technical computer-science definition it doesn’t do so well in the user-centric definition. In practice Android multitasking is mostly about task switching and doing things like checking email in the background. Having multiple programs running at once is particularly difficult due to the Android model of applications sometimes terminating when they aren’t visible. A common task is to view a message in a MUA and switch between that and another window (EG a web browser). K9 is my preferred MUA for Android which seems to have no option to switch back and still be viewing the same message as before the task switch – so at least three actions need to be taken to get back to the same message after I resume K9. One major feature to make multitasking on Android more usable would be a way of rapidly switching between two applications and being certain that each one would be in the same state when the user switches back to it.

Copy and Paste

Another problem with Android multitasking is the difficulty in copying and pasting text. While copy/paste is not strictly required for multitasking it is a logical requirement when you have multiple applications running on behalf of a single user. For PCs everyone knows that you select text by holding down the SHIFT key while using the cursor control keys or by holding down the mouse button and swiping the mouse cursor over the text and you then use CTRL-C or the Edit menu to copy text. On Android it’s a long press to select text which then gives you markers for the start and end, you drag those markers around and then select that you want to copy the text. This is at best a lot more inconvenient than using a high resolution input device like a mouse to select text. At worst it doesn’t seem particularly reliable, K9 Mail for example won’t let me copy text from a message for unknown reasons – on a desktop OS such problems are vanishingly rare such that I can’t think of an example of it happening.

IO and Multitasking

Multitasking for a user (as opposed to the multitasking needed to host dozens or hundreds of concurrent users) on Unix servers was very limited in the days of VT100 terminals and similar devices. Programs such as GNU Screen [2] allowed a text display to perform windowing functions that are similar to a modern GUI. But generally it seems that the ability for a user to run multiple programs at once is largely limited by their ability to see the output and to rapidly switch between programs or sessions.

As a keyboard with ~100 keys and a text display with 80*25 characters is a major limitation it’s obviously going to be a comparable (and often greater) limitation to have an on-screen “keyboard” that takes half the screen space, a single program taking all the screen, and a drop-down status bar that might be useful for multitasking.

With Android 4.0 and above you can activate a task switcher by holding down the home button for two seconds [3]. There are also a variety of third party task switching programs on the Google Play store which all seem to start by holding down the home button. One problem with these options is that they require an extended press of the home button where the ideal is something that is as quick as ALT-TAB or a single mouse movement on a desktop system. One possible input action would be to switch between the most recent tasks with a palm swipe on the screen – an operation that is quick and easy. Currently a palm swipe is used for a screen capture, but as there are four possible directions for swiping the screen one of them could be used for screen capture and another two for task switching. But this wouldn’t do a lot of good without the ability to switch tasks without losing the context – that either requires Android application changes or having the OS not tell an application that it was occluded.

The iPaQ had interesting capabilities for input, it had a main button on the front that could be pushed in four directions (usually for cursor control) as well as being pushed in, four extra buttons on the front, and a button on the side [4]. I don’t recall the methods that Familiar Linux on the iPaQ [5] used for task switching, but it was less of an issue as the iPaQ had less RAM, no Internet access and no telephony functions. I think that adding a bunch of extra buttons to an Android phone would make it a lot more useful. The iPaQ method of cursor control is one that could be considered (it could alleviate the copy/paste problems among other things). As an aside in two years of using Android phones I’ve done less serious writing on Android than I did in my first two years of using Familiar on the iPaQ largely due to the lack of keys and a stylus on my Android phones.

The screen size on Android phones is also a limit for multitasking. The earlier/cheaper phones that have small screens with resolutions such as 320*480 have very limited ability to display two programs at once. The 720*1280 display in the Galaxy S3 has a lot more potential in this regard and the Galaxy Note 2 and the HTC J Butterfly AKA Droid DNA have even more potential. In the future it seems that screen size limitations on phone multitasking will be a solved problem for everyone who can afford one of the high end phones – which incidentally are much cheaper than the iPaQ was 10 years ago.

Conclusion

Checking email in the background etc is very useful on Android systems. But in terms of the user running two programs at once it seems very limited, and that situation seems likely to remain until the vendors adopt multi-window support. This could be difficult given that Google applied a lot of pressure to CyanogenMod to stop them from doing it [6].

Even when a system with a large display (particularly a tablet) runs a version of Android that supports multi-window mode that still won’t entirely solve the problem. No matter how big your display is there are occasions when you need to use it all for a single application while still having the ability to rapidly switch to another application. User interface tweaks to allow rapid task switching without losing application context are necessary.

Finally for the past two years that I’ve been using Android devices I have been disappointed in the ways that they compare poorly to the iPaQ running Familiar I used 10 years ago. I once wrote a feature article for a magazine on an iPaQ while so far I haven’t even written a blog post on an Android device. I think that some of the earlier Android devices might have been better in some ways, the trackball on the HTC Nexus One might have made it more suitable for writing long articles than more recent Android devices.

6 comments to Android Multitasking

  • MJD

    Interesting thoughts. Reagrding the task switcher, there are a couple of facts I’d like to point out:

    1) Previous versions of Android had a task switcher too. It didn’t include previews, and had a smaller back history. I don’t know when it was first available, but it was available at least on Gingerbread (2.3)
    2) On newer style Android devices (at least Nexus devices >=Galaxy Nexus and most tablets) have a dedicated task switching button. It definitely makes the function much more usable.
    3) As far as I know, Android does provide the necessary support to have apps work as you describe when switching between them using the task switcher. Some of that does seem predicated on your device having more memory, but on my phone most apps behave as I would expect when switching between them (ie not losing context).

  • Julian Andres Klode

    Recent apps switching is not an Android 4.X feature, the same was present in Android 2 (I only checked 2.3) as well. The Nexus devices and other 4.X devices purer than Samsung have a separate recent apps switch button.

  • This brings back memories. I was using Linux extensively on an iPAQ and later Zaurus, see my hacks on http://pocketworkstation.org/ . But overall I find the current Android devices vastly more useful, though I still wouldn’t consider any of them to be a suitable replacement for a traditional desktop – for complex editing tasks, multiple windows are essential.

    Android 4.0+ does support shift-arrow highlighting and Ctrl-X/C/V copy/paste in text edit widgets natively, you just need a keyboard with those keys. Try a Bluetooth keyboard, or Hacker’s Keyboard (I’m the maintainer of that): https://play.google.com/store/apps/details?id=org.pocketworkstation.pckeyboard . Admittedly that doesn’t solve the issue of copying displayed text in general.

    Applications only lose state when you’re running low on RAM and the task manager needs to kill backgrounded tasks – if you have a newish Android device with 1GB+ of RAM, this isn’t much of an issue.

    The Android application model is different from desktop apps. Applications are supposed to support life cycle events including onSaveInstanceState(), and should use background services for persistent state outside the GUI parts of the application. However, many applications don’t follow the guidelines and don’t handle this properly, leading to the annoyances you mention. See http://developer.android.com/reference/android/app/Activity.html#ProcessLifecycle for details.

  • Hamish

    Whats the use case for multitasking on a phone?

    I don’t quite get what exactly one would like running in the background that takes so long they can’t wait for it, so they can switch to something else and get working on that.

    There are background tasks, music for example, but that is a little different.

  • MJD

    Multitasking on phones is useful if you are viewing several different sources of information to get something done. In the simple case of checking my various feeds, being able to quickly switch between apps means when something is open in the browser I can quickly switch back to my feed reader. It also helps if I get an important email come in, as I can switch between all three apps. It isn’t perfectly seamless, so improvements can definitely be made. But it is better then nothing.

  • Roger

    It is worth pointing out that Android apps can easily show you the same thing as when you switched away, even if the app was terminated. Heck tutorials on coding Activities show you and the built-in widgets already do the work for themselves. Apps that fail to do are buggy, or possibly ported from other platforms that do not work the same way.