Google Android architecture · Curiosity is bliss

Curiosity is bliss    Archive    Feed    About

Julien Couvreur's programming blog and more

Google Android architecture

The Android OS architecture is fairly traditional, but the service and application framework is interesting and modular.

In the 3 part video below the Android team introduces the key concepts:

A class which encapsulates the intent of the user to go to another Activity. For example “send mail” or “call number”.
When an Intent is emitted, the system will try and find the registered Activity to handle it, and will start it on top of the Activity Stack.

A class implementing the UI screen to accomplish a task (like an applet). There are some default Activities available (map, mail, …). Custom Activities can plug in to replace the default ones, by registering themselves with the Activity Manager. One application can provide multiple Activities (mail app could provide 3 activities: list email, view single email, compose email).

For listening to music you need an application to continue running in the background. Services can do that. Activities can connect back to the Service. Some Services come with the system (location manager, XMPP notifications from the server, …)

Robot statue from Laputa
Common controls that you can re-use to write your own Activity (a video control, a map control, a toast notification API, …)

Optimized JVM with good pre-loading, memory sharing across apps, and optimized bytecode and JIT.

Activity Stack
The OS keeps track of all the Activities currently running (and their respective processes). But it can decide to dehydrate an Activity to free-up memory. In that case, some data is serialized out of the process, stored in the Activity stack, and the process can be killed. Later on, this Activity can be recreated (new process, rehydrate saved data, …).

How about the iPhone? Is it similar?
Also, a quick pointer to Mono for Android. It's exciting to see .Net being making progress on new platforms thru Mono (it also runs on the iPhone, but the convenient tools are not free. Too bad, I would run to the Apple store).


brill site this terrific to see you have what I am actually looking for here and this this post is exactly what I am interested in. I shall be pleased to become a regular visitor :)

Posted by: MoosyVat (April 10, 2009 04:52 PM)
comments powered by Disqus