Documente Academic
Documente Profesional
Documente Cultură
System Architecture
2005
Google buys Android from the Android Inch
http://developer.android.com/about/dashboards/index.html http://www.appbrain.com/stats/android-market-app-categories
2.3.x (2009-2013)
4.x
} Stack
Architecture
Business-friendly License
Power Management
Native Libraries
(C/C++ code)
Font Management
(FreeType)
WebKit
C libraries (Bionic)
….
Application Libraries
(Core Components of Android)
Activity Manager
Packet Manager
Telephony Manager
Location Manager
Contents Provider
Notification Manager
….
Applications
(Written in Java code)
Entertainment
Productivity
Personalization
Education
Geo-communication
….
Dalvik Virtual
Machine (VM)
Novel Java Virtual
Machine implementation
(not using the Oracle JVM)
….
APPLICATION DESIGN:
GUI Definition
Events Management
Background Operations
User Notifications
APPLICATION COMPONENTS
Activities
Intents
Services
Content Providers
Broadcast Receivers
PROGRAMMATIC APPROACH
Example:
Example:
EXAMPLE
- Build the application layout
through XML files (like HTML)
- Define two different XML layouts
for two different devices
Device 1 Device 2 - At runtime, Android detects the
HIGH screen pixel density LOW screen pixel density
current device configuration and
Java App Code loads the appropriate resources
for the application
- No need to recompile!
- Just add a new XML file if you
need to support a new device
XML Layout File XML Layout File
Device 1 Device 2
Luca Bedogni, Marco Di Felice - Programming with Android – System Architecture 21
Android Components: Activities
DECLARATIVE APPROACH
PROGRAMMATIC APPROACH
TextEdit
Button
ESEMPIO
Activity2
PASSWORD
**********
Login Intent
Login
Activity2
Multiple choices
might be available
}
Activity1
to the user!
Intent-
View Filters
Activity2
Implicit Intent
Starting Destroyed
onCreate()
onDestroy()
onStart()
Running
(on background)
insert()
APP
update()
Content
delete() Provider DB
Publish/Subscribe
paradigm
Broadcast Receivers:
An application can be
signaled of external
events.
ANDROIDMANIFEST.XML