I recently started reading the Android development guide. I'm interested in working on mobile devices, and considering I run Ubuntu, Android is the best choice (although I look forward to eventually playing with the other popular phone). I was thoroughly impressed by the architecture developed to support multitasking, and wanted to write about it. One of the things that really puts me off about the iPhone is the fact that I can't run processes in the background (not legally at least). The Android developers, really thought it over well, and developed what I think is a fantastic architecture, which I'm going to summarize. You can go ahead and read the very long Application Fundamentals document to get a much more detailed view into it, but I'll summarize it for those who would otherwise TL;DR the document.
Essentially, an application is broken down into two major parts, Activities and Services. Additionally, you have broadcast receivers, which listen to messages sent by the system or another application, and content providers, which allows other applications to query data from yours.
So to the meaty subject, let's start with Activities. Anything UI related is considered an activity, and you generally split every action as an activity. The great thing about this, is that other applications can open your activity from their application. For a good example, say you have a reading application, and the user wants to Tweet a page. If they have an application that can handle posting to Twitter, you just load it's activity post and populate the content.
Now, on to multitasking. Services are parts of your application that run on the background. They don't have any UI, although they can use dialogs to notify the user. Services run separately from your activities (at least you'll generally want to start them in a separate thread) and stay running until you kill them. So, if you want to run something in the background, you create a service and let it do its thing.
Another great thing that Android does for you, is close your application only when it needs to. The user isn't responsible for the task. They can just leave your application, and come back to it as they left it. The operating system takes care of closing applications only if it needs more memory. The best part, is that it is very smart about it.
I'm starting to get to the point where this post is too long, so if you want to read more about it, and I think you should, head to the
Android developer guide. It's truly impressive, and I have to admit, I am very excited about working more on this platform.