Professional Documents
Culture Documents
Andriod Operating System
Andriod Operating System
Andriod Operating System
ON
ANDROID OPERATING SYSTEM
K.VAMSI JAYASIMHA (20071114),
N. SUDHEER (20071110)
COMPUTER SCIENCE AND ENGINEERING DEPARTMENT
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS)
jayasimhavamsi@gmail.com (9052039300)
sudheer110@gmail.com(9701433090)
an android application and the features of
ABSTRACT
the android.
Introduction
Android is a software platform and
The unveiling of the
operating system for mobile devices. It is
Android platform was announced with the
based on the Linux kernel, and developed
formation of the Open Handset Alliance, a
by Google and later the Open Handset
consortium of 48 hardware, software and
Alliance. It allows developers to write
telecom companies devoted to advancing
managed code in the Java language,
open standards for mobile devices. Google
controlling the device via Google-
has made most of the Android platform
developed Java libraries. Applications
available under the Apache free-software
written in C and other languages can be
and open source license.
compiled to ARM native code and run, but
Android is a freely
this development path isn't officially
downloadable open source software stack
supported by Google.
for mobile devices that includes an
Android is available as open source.
operating system, middleware and key
Google threw open the entire source code
applications based on Linux and Java.
(including network and telephony stacks)
Google developed Android
that were not available previously, under
collaboratively as part of the Open
an Apache license. Certain parts that relate
Handset Alliance, a group of more than 30
to a specific hardware can't be made open
mobile and technology companies working
and are not considered part of the Android
to open up the mobile handset
platform. With Apache License, vendors
environment. Android's development kit
are free to add proprietary extensions
supports many of the standard packages
without submitting those back to the open
used by Jetty, and so, due to that fact and
source community. While Google's
Jetty's modularity and lightweight
contributions to this platform are expected
footprint, it was possible to port Jetty to it
to remain open-sourced, the branches
so that it will be able to run on the Android
could explode using varieties of licenses.
platform.
This paper on Android Features of Android
deals with the history of the Android, the
early prototypes, basic building blocks of
• Handset layouts Android can some other Mobile Operating
adapt to traditional smart phone Systems.
layouts, as well other VGA, 2D,
• Media Support Android supports
and 3D graphics libraries.
a wide range of audio, video,
• Storage Android uses SQLite to media, and still formats. MPEG-4,
store all its junk— i.e information. OGG, and AAC are just a few of
these. Unfortunately the Media
• Connectivity Android supports a
Player as its known right now is
wide variety of technologies,
pretty basic, although more robust
including Bluetooth, WiFi,
offerings on are the horizon from
GSM/EDGE, and EV-DO.
3rd Party developers.
in Dalvik Byte codes (say that five below it. Starting from the bottom, the
times fast. I keep ending up with following sections highlight the layers
architecture diagram is the Applications Activities are the most common of the
and Widgets layer. Think of this as the tip four Android building blocks. An activity
of the Android iceberg. End users will see is usually a single screen in your
only these programs, blissfully unaware of application. Each activity is implemented
all the action going on below the as a single class that extends the Activity
waterline. base class. Your class will display a user
interface composed of Views and respond
to events. Most applications consist of Broadcast Receiver, see below) is capable
multiple screens. For example, a text of handling. An activity that is able to
messaging application might have one display contact information for a person
screen that shows a list of contacts to send would publish an Intent Filter telling that it
messages to, a second screen to write the knows how to handle the action VIEW
message to the chosen contact, and other when applied to data representing a
screens to review old messages or change person. Activities publish their Intent
settings. Each of these screens would be Filters in the AndroidManifest.xml file.
implemented as an activity. Moving to . The new activity is informed of the
another screen is accomplished by a intent, which causes it to be launched. The
starting a new activity. In some cases and process of resolving intents happens at run
activity may return a value to the previous time when start Activity is called, which
activity -- for example an activity that lets offers two key benefits:
the user pick a photo would return the • Activities can reuse
chosen photo to the caller. functionality from other
components simply by making a
Intent and Intent Filters
request in the form of an Intent
Android uses a special class called Intent
• Activities can be replaced at
to move from screen to screen. Intent
any time by a new Activity with
describes what an application wants to be
an equivalent Intent Filter
done. The two most important parts of the
BROADCAST INTENT RECEIVER
intent data structure are the action and the
You can use a Broadcast Receiver
data to act upon. Typical values for action
when you want code in your application to
are MAIN (the front door of the
execute in reaction to an external event, for
application), VIEW, PICK, EDIT, etc. The
example, when the phone rings, or when
data is expressed as a URI. For example,
the data network is available, or when it's
to view contact information for a person,
midnight. Broadcast Receivers do not
you would create intent with the VIEW
display a UI, although they may use the
action and the data set to a URI
Notification Manager to alert the user if
representing that person.
something interesting has happened.
There is a related class called an Intent
Broadcast Receivers are registered in
Filter. While an intent is effectively a
AndroidManifest.xml, but you can also
request to do something, an intent filter is
register them from code using
a description of what intents an activity (or
Context.registerReceiver ( ).Your music service, this might allow you to
application does not have to be running for pause, rewind, etc.
its BroadcastReceivers to be called; the
system will start your application, if CONTENT PROVIDER
necessary, when a BroadcastReceiver is Applications can store their data in files, a
triggered. Applications can also send their SQLite database, or any other mechanism
own intent broadcasts to others with that makes sense. A content provider,
Context.sendBroadcast (). however, is useful if you want your
application's data to be shared with other
SERVICE applications. A content provider is a class
that implements a standard set of methods
A Service is code that is long-lived and to let other applications store and retrieve
runs without a UI. A good example of this the type of data that is handled by that
is a media player playing songs from a content provider.
play list. In a media player application, Not every application needs to have all
there would probably be one or more four, but your application will be written
activities that allow the user to choose with some combination of these.
songs and start playing them. However, All the components needed for android
the music playback itself should not be application should be listed in an xml file
handled by an activity because the user called AndroidManifest.xml. This is an
will expect the music to keep playing even XML file where you declare the
after navigating to a new screen. In this components of your application and what
case, the media player activity could start a their capabilities and requirements are.
service using Context.startService () to
run in the background to keep the music
going. The system will then keep the
Storing, Retrieving and
music playback service running until it has Exposing Data
finished. Note that you can connect to a
service (and start it if it's not already A typical desktop operating system
running) with the Context.bindService () provides a common file system that any
method. When connected to a service, you application can use to store and read files
can communicate with it through an that can be read by other applications.
interface exposed by the service. For the Android uses a different system on
Android; all application data are private to database is private to the
that application. However, Android also package that creates it.
provides a standard way for an application
Content Providers
to expose its private data to other
A content provider is an
applications. This section describes the
optional component of an
many ways that an application can store
application that exposes
and retrieve data, expose its data to other
read/write access to an
applications, and also how you can request
application's private data,
data from other applications that expose
subject to whatever restrictions
their data.
it wants to impose. Content
Android provides the following
providers implement standard
mechanisms for storing and retrieving
request syntax for data, and a
data:
standard access mechanism for
the returned data. Android
The Android APIs contain runs in its own process. Most security
application can create and use a enforced at the process level through
private SQLite database. Each standard Linux facilities, such as user and
group IDs that are assigned to applications. Application Signing
Additional finer-grained security features
are provided through a "permission" All Android applications (.apk files) must
mechanism that enforces restrictions on be signed with a certificate whose private
the specific operations that a particular key is held by their developer. This
process can perform, and per-URI certificate identifies the author of the
permissions for granting ad-hoc access to application. The certificate does not need
specific pieces of data. to be signed by a certificate authority: it is
System Architecture perfectly allowable, and typical, for
A central design point of the Android Android applications to use self-signed
security architecture is that no application, certificates. The certificate is used only to
by default, has permission to perform any establish trust relationships between
operations that would adversely impact applications, not for wholesale control
other applications, the operating system, or over whether an application can be
the user. This includes reading or writing installed. The most significant ways that
the user's private data such as contacts or signatures impact security is by
e-mails, reading or writing another determining who can access signature-
application's files, performing network based permissions and who can share user
access, keeping the device awake, etc. IDs.
An application's process is a secure
sandbox. It can't disrupt other applications, User IDs and File Access
except by explicitly declaring the
permissions it needs for additional Each Android package (.apk) file installed
capabilities not provided by the basic on the device is given its own unique
sandbox. These permissions it requests can Linux user ID, creating a sandbox for it
be handled by the operating in various and preventing it from touching other
ways, typically by automatically allowing applications (or other applications from
or disallowing based on certificates or by touching it). This user ID is assigned to it
prompting the user. The permissions when the application is installed on the
required by an application are declared device, and remains constant for the
statically in that application, so they can be duration of its life on that device.
known up-front at install time and will not Using Permissions
change after that.
A basic Android application has no • When accessing and
permissions associated with it, meaning it operating on a content
can not do anything that would adversely provider.
impact the user experience or any data on • Binding or starting a
the device. To make use of protected service
features of the device, you must include in
your AndroidManifest.xml one or more
Declaring and Enforcing Permissions
<uses-permission> tags declaring the
permissions that your application needs.
To enforce your own permissions, you
The permissions provided by the Android
must first declare them in your
system can be found at Manifest.
AndroidManifest.xml using one or more
Permission. Any application may also <permission> tags.
define and enforce its own permissions, so
this is not a comprehensive list of all The <protection Level> attribute is
possible permissions. required, telling the system how the user is
A particular permission may be enforced to be informed of applications requiring
at a number of places during your the permission, or who is allowed to hold
program's operation: that permission, as described in the linked
• At the time of a call documentation.
into the system, to prevent The <permission Group> attribute is
an application from optional, and only used to help the system
executing certain functions. display permissions to the user. You will
• When starting an usually want to set this to either a standard
activity, to prevent system group (listed in
applications from launching android.Manifest.permission_group) or in
activities of other more rare cases to one defined by yourself.
applications. It is preferred to use an existing group, as
control who can receive Note that both a label and description
General Android
http://code.google.com/android/kb/general.html#c.