Beruflich Dokumente
Kultur Dokumente
A Short Introduction to
Android
Notes taken from Googles Android SDK
and Googles Android Application Fundamentals
- Application Lifecycle
http://www.youtube.com/watch?v=fL6gSd4ugSI
- Application Programmer
Interfaces
http://www.youtube.com/watch?v=MPukbH6D-lY
95-702 Distributed Systems
Master of Information System 2
Management
Why Android?
Mobile platforms represent
important components of
distributed systems.
Android is a new and interesting
mobile platform.
Android may also become
important on non-mobile
platforms.
We will look at Android from a
developers point of view.
95-702 Distributed Systems
Master of Information System 3
Management
What is Android?
Applications Contacts Phone Browser Home
Activity Components
Service Components
Intent Receiver Components
Content Provider Components
onCreate()
onStart()
onResume()
onFreeze()
onStop()
onDestroy()
Activity Activity
Each activity usually
represents a single
screen.
One activity may
start another within Activity
the same application.
The users interaction
takes place through
views.
An application would usually consist
of several activities. Views consist of buttons, text fields,
scroll bars, etc., and are organized in a
hierarchy.
95-702 Distributed Systems
Master of Information System 25
Management
Service Components
Service Content
Provider
UI Events Looper
Message Queue
System Events
95-702 Distributed Systems
Master of Information System 29
Management
A Linux Process
Activity Broadcast
Receiver
Looper
Service Content
Provider
Message Queue
Two approaches:
(1)Intents
(2)Remote Methods
Process A Process B
95-702 Distributed Systems
Master of Information System 31
Management
Inter-Process
Communication - Intents
From Googles Developers Reference:
Activity1
Create an Intent Object Activity2
Set its action. Launched because its
Set a URI. intent filter matches the
Set a MIME type MIME type and action
call
startActivityForResult return a new Intent
with the Intent object object to the activity
The onActivityResult that started this instance
method is called when
a result is available
Process B
Process A
95-702 Distributed Systems
Master of Information System 36
Management
Inter-Process
Communication Remote
Methods and AIDL
AIDL (Android Interface Definition Language) is an IDL language
used to generate code that enables two processes on an
Android-powered device to talk using interprocess communication
(IPC). If you have code in one process (for example, in an Activity)
that needs to call methods on an object in another process (for
example, a Service), you would use AIDL to generate code to
marshall the parameters.