Curiosity is bliss    Archive    Feed    About    Search

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:

Intent
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.

Activity
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).

Service
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
Views
Common controls that you can re-use to write your own Activity (a video control, a map control, a toast notification API, …)

Dalvik
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 blog.monstuff.com 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