Android is a software stack that includes an operating system, middleware and key applications for mobile devices. It uses the Java programming language and includes features like application frameworks, SQLite for storage, and support for common media formats. The Android architecture consists of applications, an application framework, libraries and services, the Android runtime and the Linux kernel. Activities are the basic building blocks of Android apps and have a defined lifecycle of states they move through as the user interacts with the app.
2. What is Android?
Android is a software stack for mobile
devices that includes an operating system,
middleware and key applications.
The Android SDK provides the tools and APIs
necessary to begin developing applications
on the Android platform using the Java
programming language.
3. Features
Application framework enabling reuse and
replacement of components
Dalvik virtual machine optimized for mobile
devices
Integrated browser based on the open
source WebKit engine
Optimized graphics powered by a custom 2D
graphics library; 3D graphics based on the
OpenGL ES
SQLite for structured data storage
4. Features
Media support for common audio, video, and
still image formats (MPEG4, H.264, MP3, AAC,
AMR, JPG, PNG, GIF)
GSM Telephony
Bluetooth, EDGE, 3G, and WiFi
Camera, GPS, compass, and accelerometer
Rich development environment including a
device emulator, tools for debugging, memory
and performance profiling, and a plugin for the
Eclipse IDE
8. Android Architecture
Applications
Android will ship with a set of core
applications including an email client, SMS
program, calendar, maps, browser, contacts,
and others. All applications are written using
the Java programming language.
9. Android Architecture
Application Framework
Developers have full access to the same
framework APIs used by the core
applications. The application architecture is
designed to simplify the reuse of
components; any application can publish its
capabilities and any other application may
then make use of those capabilities.
10. Android Architecture
Libraries
Android includes a set of C/C++ libraries
used by various components of the Android
system. These capabilities are exposed to
developers through the Android application
framework. Some of the core libraries are:
System C library, Media Libraries, Surface
Manager , LibWebCore, 3D libraries ,
FreeType and SQLite.
11. Android Architecture
Android Runtime
Every Android application runs in its own
process, with its own instance of the Dalvik
virtual machine. Dalvik has been written so
that a device can run multiple VMs efficiently.
12. Android Architecture
Linux Kernel
Android relies on Linux version 2.6 for core
system services such as security, memory
management, process management, network
stack, and driver model. The kernel also acts
as an abstraction layer between the hardware
and the rest of the software stack.
13.
14.
15.
16.
17. Activity
An activity is a single, focused thing that the
user can do. Almost all activities interact with
the user, so the Activity class takes care of
creating a window for you in which you can
place your UI with setContentView(View)
While activities are often presented to the
user as full-screen windows, they can also be
used in other ways: as floating windows or
embedded inside of another activity.
18. Activity
There are two methods almost all subclasses of
Activity will implement:
onCreate(Bundle) is where you initialize your
activity.
onPause() is where you deal with the user
leaving your activity. Most importantly, any
changes made by the user should at this point
be committed.
19. Activity Lifecycle
Activities in the system are managed as
an activity stack. When a new activity is started,
it is placed on the top of the stack and becomes
the running activity -- the previous activity
always remains below it in the stack, and will
not come to the foreground again until the new
activity exits.
An activity has essentially four states:
• If an activity in the foreground of the screen (at
the top of the stack), it is active or running.
20. Activity Lifecycle
If an activity has lost focus but is still visible
(that is, a new non-full-sized or transparent
activity has focus on top of your activity), it
is paused.
If an activity is completely obscured by
another activity, it is stopped.
If an activity is paused or stopped, the system
can drop the activity from memory by either
asking it to finish, or simply killing its process.
When it is displayed again to the user, it must
be completely restarted and restored to its
previous state.
21. Activity Lifecycle
The following diagram shows the important
state paths of an Activity. The square
rectangles represent callback methods you
can implement to perform operations when
the Activity moves between states. The
colored ovals are major states the Activity
can be in.
23. Activity Lifecycle
The entire lifecycle of an activity is defined by
the following Activity methods. All of these are
hooks that you can override to do appropriate
work when the activity changes state.
All activities will implement onCreate(Bundle)
to do their initial setup; many will also
implement onPause() to commit changes to
data and otherwise prepare to stop interacting
with the user. You should always call up to
your superclass when implementing these
methods.
25. Activity Lifecycle
onCreate()
Called when the activity is first created. This
is where you should do all of your normal
static set up: create views, bind data to lists,
etc. This method also provides you with a
Bundle containing the activity's previously
frozen state, if there was one. Always
followed by onStart().
26. Activity Lifecycle
onRestart()
Called after your activity has been stopped,
prior to it being started again. Always
followed by onStart().
27. Activity Lifecycle
onStart()
Called when the activity is becoming visible
to the user. Followed by onResume() if the
activity comes to the foreground,or onStop()
if it becomes hidden.
28. Activity Lifecycle
onResume()
Called when the activity will start interacting
with the user. At this point your activity is at
the top of the activity stack, with user input
going to it. Always followed by onPause().
29. Activity Lifecycle
onPause()
Called when the system is about to start resuming
a previous activity. This is typically used to commit
unsaved changes to persistent data, stop
animations and other things that may be
consuming CPU, etc. Implementations of this
method must be very quick because the next
activity will not be resumed until this method
returns. Followed by either onResume() if the
activity returns back to the front, oronStop() if it
becomes invisible to the user.
30. Activity Lifecycle
onStop()
Called when the activity is no longer visible to
the user, because another activity has been
resumed and is covering this one. This may
happen either because a new activity is being
started, an existing one is being brought in
front of this one, or this one is being destroyed.
Followed by either onRestart() if this activity is
coming back to interact with the user,
or onDestroy() if this activity is going away.
31. Activity Lifecycle
onDestroy()
The final call you receive before your activity is
destroyed. This can happen either because the
activity is finishing (someone called finish() on
it, or because the system is temporarily
destroying this instance of the activity to save
space. You can distinguish between these two
scenarios with the isFinishing() method.
34. Development
process for an
Android app
http://developer.android.com/guide/developing/index.html
35. Android Design Philosophy
Applications should be:
Fast
Resource constraints: <200MB RAM, slow processor
Responsive
Apps must respond to user actions within 5 seconds
Secure
Apps declare permissions in manifest
Seamless
Usability is key, persist data, suspend services
Android kills processes in background as needed
36. Advantages
There are a host of advantages that Google’s
Android will derive from being an open source
software. Some of the advantages include:
• The ability for anyone to customize the Google
Android platform
• The consumer will benefit from having a wide
range of mobile applications to choose from
since the monopoly will be broken by Google
Android
• Men will be able to customize a mobile
phones using Google Android platform like
never before
37. Advantages
• Features like weather details, opening screen,
live RSS feeds and even the icons on the
opening screen will be able to be customized
• As a result of many mobile phones carrying
Google Android, companies will come up with
such innovative products like the location
• In addition the entertainment functionalities
will be taken a notch higher by Google Android
being able to offer online real time multiplayer
games
38. References
http://developer.android.com/index.html
10 Types of Devices That Android Is Making
Better
http://www.androidauthority.com/android-everywh
Editor's Notes
The linux kernel 2.6 is the hardware abstraction layer (HAL) between the hardware and the android software stack.