Professional Documents
Culture Documents
INDEX
1. Introduction
1.4 Security
2. History
2.4Updates of android
4. Android Architecture
4.1 Applications
4.3 Libraries
5. Features
1
NIT,Kurukshetra Android Operating System
6.1.1 Software
9.Native code
12. Application
13. Limitation
15. Conclusion
16. Reference
2
NIT,Kurukshetra Android Operating System
ABSTRACT
Android is a mobile operating system running on the Linux kernel. It is a software stack for
mobile services that includes an operating system, middleware and key applications. It also
contains a rich set of APIs that allows third-party developers to develop great applications.
The first cellular cell phone to feature the new operating system was the T-Mobile G1,
released on Oct. 22, 2008.
It was initially developed by Google and later the Open Handset Alliance. In July
2005, Google acquired Android, Inc. On 5 November 2007, the Open Handset Alliance,
a consortium of several companies was unveiled with the goal to develop open standards for
mobile devices. On 23 September 2008 the Android 1.0 SDK (Release 1) was released. On
30 April 2009, the official 1.5 update for Android was released .There are several new
features and UI updates included in the 1.5 update: Since 21 October 2008, Android has been
available as open source. Google opened the entire source code (including network and
telephony stacks) under an Apache License. On March 9, 2009, Google released version 1.1
for the android dev phone. On 30 April 2009, the official 1.5 update for Android was
released.
Android includes a set of core libraries that provides most of the functionality available in the
core libraries of the Java programming language. Software written in Java can be compiled to
be executed in the Dalvik virtual machine, which is a specialized VM implementation
designed for mobile device use, although not technically a standard Java Virtual Machine.
The Android SDK provides the tools and APIs necessary to begin developing applications on
the Android platform using the Java programming language. 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.A central design point of the Android security
architecture is that no application, by default, has permission to perform any operations that
3
NIT,Kurukshetra Android Operating System
would adversely impact other applications, the operating system, or the user. This includes
reading or writing the user's private data (such as contacts or e-mails), reading or writing
another application's files, performing network access, keeping the device awake, etc. 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. The
Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for
minimal memory footprint. The VM is register-based, and runs classes compiled by a Java
language compiler that have been transformed into the .dex format by the included "dx" tool.
The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and
low-level memory management.
Various features of android includes: 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 1.0 specification (hardware acceleration optional). SQLite for
structured data storage. Media support for common audio, video, and still image formats (MPEG4,
H.264, MP3, AAC, AMR, JPG, PNG, GIF).GSM Telephony (hardware dependent).Bluetooth,
EDGE, 3G, and WiFi (hardware dependent).Camera, GPS, compass, and
accelerometer (hardware dependent).Rich development environment including a device emulator,
tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE.
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
applications include Google Voice for the Google Voice service. Android graphics are
powered by a custom 2D graphics library and OpenGL ES 1.0 for high performance 3D
graphics. programming language. Google's Chrome browser is more than just an attention-
grabbing software app. Combined with Gears functionality and the upcoming Android
release, it delivers on Netscape's promise of the browser as operating system, with online-
4
NIT,Kurukshetra Android Operating System
and-off webapps replacing desktop workhorses.Android is a small bet that has the potential
for a big impact on wireless service innovation...
1.INTRODUCTION
Android is a mobile operating system running on the Linux Kernel. Android is a software
stack for mobile devices that includes an operating system, middleware and key applications.
It was initially developed by Google and later by the Open Handset Alliance. It allows
developers to write managed code in the java language, controlling the device via Google-
developed Java libraries. The Android SDK provides the tools and APIs necessary to begin
developing applications on the Android platform using the Java programming language.
Android does not differentiate between the phone's core applications and third-party
applications. They can all be built to have equal access to a phone's capabilities providing
users with a broad spectrum of applications and services. Android breaks down the barriers to
building new and innovative applications. Android was built from the ground-up to enable
developers to create compelling mobile applications . It is built to be truly open. For example,
an application could call upon any of the phone's core functionality such as making calls,
sending text messages, or using the camera, allowing developers to create richer and more
cohesive experiences for users.
Open source is a development method for software that harnesses the power of distributed
peer review and transparency of process. The promise of open source is better quality, higher
reliability, more flexibility, lower cost, and an end to predatory vendor block-in.
Android is open source. It is built on the open Linux Kernel. Furthermore, it utilizes a custom
virtual machine that was designed to optimize memory and hardware resources in a mobile
environment.; it can be liberally extended to incorporate new cutting edge technologies as
they emerge. The open source platform will continue to evolve as the developer community
works together to build innovative mobile applications.
5
NIT,Kurukshetra Android Operating System
In an Android application, the user interface is built using View and ViewGroup objects. On
the Android platform,an Activity's UI is designed using a hierarchy of View and ViewGroup
nodes, as shown in the diagram below. This hierarchy tree can be as simple or complex as it
need to be, and can build it up using Android's set of predefined widgets and layouts, or with
custom Views created ourself.
On Android, all application data (including files) are private to that application. However,
Android also provides a standard way for an application to expose its private data to other
applications — through content providers. A content provider is an optional component of an
application that exposes read/write access to the application's data, subject to whatever
restrictions it might impose. Content providers implement a standard syntax for requesting
and modifying data, and a standard mechanism for reading the returned data. Android
supplies a number of content providers for standard data types, such as image, audio, and
video files and personal contact information.
1.4 Security:
6
NIT,Kurukshetra Android Operating System
Android is a multi-process system, in which each application (and parts of the system) runs in
its own process. Most security between applications and the system is enforced at the process
level through standard Linux facilities, such as user and group IDs that are assigned to
applications. Additional finer-grained security features are provided through a "permission"
mechanism that enforces restrictions on the specific operations that a particular process can
perform, and per-URI permissions for granting ad-hoc access to specific pieces of data. A
central design point of the Android security architecture is that no application, by default, has
permission to perform any operations that would adversely impact other applications, the
operating system, or the user.
7
NIT,Kurukshetra Android Operating System
2.HISTORY
In July 2005, Google acquired Android, Inc., a small startup company based in Palo Alto,
California, USA.Android's co-founders who went to work at Google included Andy Rubin
(co-founder of Danger), Rich Miner (co-founder of Wildfire Communications, Inc), Nick
Sears (once VP at ), and Chris White (headed design and interface development at WebTV).
At the time, little was known about the functions of Android, Inc. other than that they made
software for mobile phones.This began rumors that Google was planning to enter the mobile
phone market, although it was unclear what function it might perform in that market.
At Google, the team, led by Rubin, developed a mobile device platform powered by
the Linux kernel which they marketed to handset makers and carriers on the premise of
providing a flexible, upgradeable system. It was reported that Google had already lined up a
series of hardware component and software partners and signaled to carriers that it was open
to various degrees of cooperation on their part.
8
NIT,Kurukshetra Android Operating System
More speculation that Google would be entering the mobile-phone market came in December
2006.Reports from the BBC and The Wall Street Journal noted that Google wanted its search
and applications on mobile phones and it was working hard to deliver that. Print and online
media outlets soon reported rumors that Google was developing a Google-
branded handset.More speculation followed reporting that as Google was defining technical
specifications, it was showing prototypes to cell phone manufacturers and network operators.
As many as 30 prototype phones were reported to be operating "in the wild."
9
NIT,Kurukshetra Android Operating System
Dalvik virtual machine (DVM) is a process virtual machine which is part of an open source
the Android mobile phone platform based on the Linux operating system and is developed by
the OHA (Open Handset Alliance) which is a consortium of companies including Google,
HTC (High Tech Computer Corporation-Taiwan), Intel, Motorola, Qualcomm, T-Mobile, and
NVIDIA. The DVM was originally developed by Dan Bornstein. The others who contributed
along with Dan Bornstein were mainly engineers from Google as part of the Android mobile
phone platform.
The DVM operates on bytecodes that are transformed from the Java Class files compiled by a
Java compiler into another class file format called the .dex format using a dx tool which is
included in the Android SDK (Software Development Kit). The primary goal of the DVM
which is creation of platform neutral dex files, is comparable to the Java Virtual
Machine(JVM) which processes the Java bytecodes while using Java Class files or Jar files.
The processes of the DVM are typically optimized for the low memory requirements needed
for development and implementation of applications for the mobile phone platform. It is
designed to allow multiple VM instances to run at once.
Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped
into a single .apk (Android Package) file on the device. .dex files can be created by
automatically translating compiled applications written in the Java programming language.
Unlike most virtual machines and true Java VMs which are stack machine the Dalvik VM is
a register-based architecture. Like the CISC vs. RISC debate, the relative merits of these two
10
NIT,Kurukshetra Android Operating System
The Dalvik executables may be modified again when they get installed onto a mobile device.
In order to gain further optimization, byte order may be swapped in certain data, simple data
structures and function libraries may be linked inline, and empty class objects may be short-
circuited, for example.
Being optimized for low memory requirements, Dalvik has some specific characteristics that
differentiate it from other standard VMs.
Moreover, Dalvik has been designed so that a device can run multiple instances of the VM
efficiently.
11
NIT,Kurukshetra Android Operating System
4.ANDROID ARCHITECTURE
The following diagram shows the major components of the Android operating system. Each
section is described in more detail below:-
4.1Applications
At the top of the stack are the applications themselves. This is where we find the basic
functions of the device such as making phone calls, accessing the Web browser and accessing
12
NIT,Kurukshetra Android Operating System
contacts list.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. Only Google programmers, application developers and
hardware manufacturers access the other layers further down the stack.
4.2Application Framework
It is the second layer of the android architecture. 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 (subject to security constraints enforced
by the framework). This same mechanism allows components to be replaced by the user.
• A rich and extensible set of Views that can be used to build an application, including
lists, grids, text boxes, buttons, and even an embeddable web browser
• Content Providers that enable applications to access data from other applications
(such as Contacts), or to share their own data
• A Resource Manager, providing access to non-code resources such as localized
strings, graphics, and layout files
• A Notification Manager that enables all applications to display custom alerts in the
status bar
• An Activity Manager that manages the lifecycle of applications and provides a
common navigation back stack
For more details and a walkthrough of an application, see the Notepad Tutorial
4.3Libraries
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 listed below:
13
NIT,Kurukshetra Android Operating System
• Media Libraries – It is based on Packet Video’s Open CORE; the libraries support
playback and recording of many popular audio and video formats, as well as static
image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG
• Surface Manager - manages access to the display subsystem and seamlessly
composites 2D and 3D graphic layers from multiple applications
• LibWebCore - a modern web browser engine which powers both the Android
browser and an embeddable web view
• SGL - the underlying 2D graphics engine
• 3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use
either hardware 3D acceleration (where available) or the included, highly optimized
3D software rasterizer
• Free Type - bitmap and vector font rendering
• SQLite - a powerful and lightweight relational database engine available to all
applications
Android includes a set of core libraries that provides most of the functionality available in the
core libraries of the Java programming language.
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. The
Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for
minimal memory footprint. The VM is register-based, and runs classes compiled by a Java
language compiler that have been transformed into the .dex format by the included "dx" tool.
The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and
low-level memory management.
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.
14
NIT,Kurukshetra Android Operating System
5. FEATURES:
Storage The Database Software SQLite is used for data storage purposes
SMS and MMS are available forms of messaging including threaded text
Messaging
messaging.
15
NIT,Kurukshetra Android Operating System
Development Includes a device emulator, tools for debugging, memory and performance
environment profiling, a plugin for the Eclipse IDE.
Similar to the App Store on the iPhone OS, The Android Market is a catalog of
applications that can be downloaded and installed to target hardware over-the-air,
Market without the use of a PC. Originally only freeware applications were supported.
Paid-for apps have been available on the Android Market in the United States
since 19 February 2009.
Android has native support for multi-touch but the feature is disabled at the
kernel level (possibly to avoid infringing Apple patents on touch-screen
Multi-touch
technology). An unofficial mod has been developed that enables multi-touch, but
requires superuser access to the device to flash an unsigned kernel.
16
NIT,Kurukshetra Android Operating System
Home screen
Widgets
Bluetooth
Stereo Bluetooth support (A2DP and AVCRP profiles)
Auto-pairing
Improved handsfree experience
Browser
Updated with latest Webkit browser & Squirrelfish Javascript engines
Copy 'n paste in browser
Search within a page
User-selectable text-encoding
UI changes include:
Unified Go and Search box
Tabbed bookmarks/history/most-visited screen
Contacts
Shows user picture for Favorites
Specific date/time stamp for events in call log
17
NIT,Kurukshetra Android Operating System
System
New Linux kernel (version 2.6.27)
SD card filesystem auto-checking and repair
SIM Application Toolkit 1.0
Google applications (not available in the Android 1.5 System Image that is included
in the Android SDK)
View Google Talk friends' status in Contacts, SMS, MMS, GMail, and
Email applications
Batch actions such as archive, delete, and label on Gmail messages
Upload videos to Youtube
Upload photos on Picasa
18
NIT,Kurukshetra Android Operating System
Manufacture
Name Notes
r
19
NIT,Kurukshetra Android Operating System
The HTC Dream (also marketed as T-Mobile G1 in Europe and the US or Era G1 in Poland)
is an Internet-enabled 3G smartphone with an operating system designed by Google and
hardware designed by HTC. It was the first phone to the market that uses the Android mobile
device platform.[3] The phone is part of an open standards effort of the Open Handset
Alliance.
It was released in the US on 22 October 2008; in the UK on 30 October 2008;[5] and became
available in other European countries including Austria, Netherlands, and the Czech Republic
in early 2009.[6] It was released in Germany in February 2009 with a QWERTZ keyboard.
[7]
On 10 March 2009, it became available in Poland as Era G1 under a local mobile brand
affiliated with T-Mobile.
6.1.1 Software
The HTC Dream runs the Android Operating System. Most Android software developers
write their applications in Java, but because Android does not directly run Java bytecode,
they first need to be compiled into a unique non-Java bytecode, Dalvik bytecode, before they
can be executed on an Android-powered phone.
The Home screen allows the user to place icons for applications, contacts, and other items on
three virtual desktops. It also supports widgets, but until version 1.5 of the operating system
was released, third-party applications were not able to install their own widgets. [28] Since the
release of Android 1.5, however, third-party widgets are enabled.
It comes with a web browser powered by the WebKit rendering engine, the same one used
by Safari and Chrome.
20
NIT,Kurukshetra Android Operating System
Also included with the device is the Android Market application that allows users to
download new software applications from third-party developers, as well as provide publicly-
viewable ratings and comments.
21
NIT,Kurukshetra Android Operating System
Weight 158 g
Speakerphone Yes
HSCSD Yes
22
NIT,Kurukshetra Android Operating System
Infrared No
port
Video Yes
Secondary No
FEATURES OS Android OS
Browser HTML
Radio No
Games Yes
Colors Black
GPS Yes
- Digital compass
- Voice memo
- MP3 player
Stand-by Up to 406 h
23
NIT,Kurukshetra Android Operating System
The sections below describe the system and software requirements for developing Android
applications using the Android SDK tools included in Android SDK, Release .
24
NIT,Kurukshetra Android Operating System
The Android 1.5 system delivered in the SDK (as library and system image) is the
development counterpart to the Android 1.5 production system image, deployable to
Android-powered handsets starting in May 2009. The system is fully compliant and includes
no external libraries. This is the first version of the Android SDK that does not include the
Maps external library.
The Android 1.5 system delivers an updated version of the framework API. As with previous
versions, the Android 1.5 API is assigned an integer identifier — 3 — that is stored in the
system itself. This identifier, called the "API Level", allows the system to correctly determine
whether an application is compatible with the system, prior to installing the application.
API Changes
Overview
UI framework
o Framework for easier background/UI thread interaction
25
NIT,Kurukshetra Android Operating System
Applications can now use a new element in their manifest files, <uses-
configuration> to indicate to the Android system what hardware features they require
in order to function properly. For example, an application might use the element to
specify that it requires a physical keyboard or a particular navigation device, such as a
trackball. Prior to installing the application, the Android system checks the attributes
defined for the <uses-configuration> element and allows the installation to continue
only if the required hardware is present.
Speech recognition framework
o Support for using speech recognition libraries via Intent.See RecognizerIntent.
Miscellaneous API additions
o LocationManager - Applications can get location change updates via Intent
o WebView - Touch start/end/move/cancel DOM event support
o Redesigned Sensor Manager APIs
26
NIT,Kurukshetra Android Operating System
The Android NDK provides tools that allow Android application developers to embed
components that make use of native code in their Android applications.
Android applications run in the Dalvik virtual machine. The NDK allows developers to
implement parts of their applications using native-code languages such as C and C++. This
can provide benefits to certain classes of applications, in the form of reuse of existing code
and in some cases increased speed.
A set of tools and build files used to generate native code libraries from C and C++
sources
A way to embed the corresponding native libraries into application package files
(.apks) that can be deployed on Android devices
A set of native system headers and libraries that will be supported in all future
versions of the Android platform, starting from Android 1.5
Documentation, samples, and tutorials
This release of the NDK supports the ARMv5TE machine instruction set and provides
stable headers for libc (the C library), libm (the Math library), the JNI interface, and
other libraries.
27
NIT,Kurukshetra Android Operating System
Development tools
The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that can generate native
ARM binaries on Linux, OS X, and Windows (with Cygwin) platforms.
It provides a set of system headers for stable native APIs that are guaranteed to be supported
in all later releases of the platform:
Documentation
The NDK package includes a set of documentation that describes the capabilities of the NDK
and how to use it to create shared libraries for your Android applications. In this release, the
documentation is provided only in the downloadable NDK package. You can find the
documentation in the <ndk>/docs/ directory. Included are these files:
• INSTALL.TXT — describes how to install the NDK and configure it for your host
system
28
NIT,Kurukshetra Android Operating System
29
NIT,Kurukshetra Android Operating System
9. NATIVE CODE:
Libraries written in C and other languages can be compiled to ARM native code and installed
using the Android Native Development Kit. Native classes can be called from Java code
running under the Dalvik VM using the System.loadLibrary call, which is part of the standard
Android Java classes.
Complete applications can be compiled and installed using traditional development tools. The
ADB debugger gives a root shell under the Android Emulator which allows native ARM
code to be uploaded and executed. ARM code can be compiled using GCC on a standard
PC. Running native code is complicated by the fact that Android uses a non-standard C
library (known as Bionic). The underlying graphics device is available as
a framebuffer at /dev/graphics/fb0. The graphics library that Android uses to arbitrate and
control access to this device is called the Skia Graphics Library (SGL), and it has been
released under an open source license. Skia has backends for both win32 and Cairo, allowing
the development of cross-platform applications, and it is the graphics engine underlying
the Google Chrome web browser.
Elements Interactive Mobile B.V. have ported their EdgeLib C++ library to Android, and
native code executables of their S-Tris2 game (a Tetris clone) and Animate3D technology
demo are available for download.
30
NIT,Kurukshetra Android Operating System
10.SOFTWARE DEVELOPEMENT
The early feedback on developing applications for the Android platform was mixed.Issues
cited include bugs, lack of documentation, inadequate QA infrastructure, and no public issue-
tracking system. (Google announced an issue tracker on 18 January 2008.) In December
2007, MergeLab mobile startup founder Adam MacBeth stated, "Functionality is not there, is
poorly documented or just doesn't work... It's clearly not ready for prime time."Despite this,
Android-targeted applications began to appear already the week after the platform was
announced. The first publicly available application was the Snake game. The Android Dev
Phone is a SIM-unlocked and hardware-unlocked device that is designed for advanced
developers. While developers can use regular consumer devices purchased at retail to test and
use their apps, some developers may choose not to use a retail device, preferring an unlocked
or no-contract device.
A preview release of the Android software development kit (SDK) was released on 12
November 2007. On 15 July 2008, the Android Developer Challenge Team accidentally sent
an email to all entrants in the Android Developer Challenge announcing that a new release of
the SDK was available in a "private" download area. The email was intended for winners of
the first round of the Android Developer Challenge. The revelation that Google was
supplying new SDK releases to some developers and not others (and keeping this
31
NIT,Kurukshetra Android Operating System
arrangement private) has led to widely reported frustration within the Android developer
community.
On 18 August 2008 the Android 0.9 SDK beta was released. This release provides an updated
and extended API, improved development tools and an updated design for the home screen.
Detailed instructions for upgrading are available to those already working with an earlier
release. On 23 September 2008 the Android 1.0 SDK (Release 1) was released. According to
the release notes, it included "mainly bug fixes, although some smaller features were added".
It also included several API changes from the 0.9 version.
On March 9, 2009, Google released version 1.1 for the android dev phone. While there are a
few aesthetic updates, a few crucial updates include support for "search by voice, priced apps,
alarm clock fixes, sending gmail freeze fix, fixes mail notifications and refreshing intervals,
and now the maps show business reviews". Another important update is that Dev phones can
now access paid apps and developers can now see them on the Android Market.
In the middle of May, 2009 Google released version 1.5 (Cupcake) of the Android OS and
SDK. This update included many new features including video recording, support for the
stereo bluetooth profile, a customizable onscreen keyboard system and voice recognition.
This release also opened up the AppWidget framework to third party developers allowing
anyone to create their one home screen widgets.
32
NIT,Kurukshetra Android Operating System
LIFECYCLE OF ANDROID
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.
• If an activity in the foreground of the screen (at the top of the stack), it is active or
running.
• 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. A paused activity
is completely alive (it maintains all state and member information and remains
attached to the window manager), but can be killed by the system in extreme low
memory situations.
• If an activity is completely obscured by another activity, it is stopped. It still retains
all state and member information, however, it is no longer visible to the user so its
window is hidden and it will often be killed by the system when memory is needed
elsewhere.
• 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.
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.
There are three key loops you may be interested in monitoring within your activity:
• The entire lifetime of an activity happens between the first call to onCreate(Bundle)
through to a single final call to onDestroy(). An activity will do all setup of "global"
state in onCreate(), and release all remaining resources in onDestroy(). For example,
33
NIT,Kurukshetra Android Operating System
if it has a thread running in the background to download data from the network, it
may create that thread in onCreate() and then stop the thread in onDestroy().
• The visible lifetime of an activity happens between a call to onStart() until a
corresponding call to onStop(). During this time the user can see the activity on-
screen, though it may not be in the foreground and interacting with the user. Between
these two methods you can maintain resources that are needed to show the activity to
the user. For example, you can register a BroadcastReceiver in onStart() to monitor
for changes that impact your UI, and unregister it in onStop() when the user an no
longer see what you are displaying. The onStart() and onStop() methods can be called
multiple times, as the activity becomes visible and hidden to the user.
• The foreground lifetime of an activity happens between a call to onResume() until a
corresponding call to onPause(). During this time the activity is in front of all other
activities and interacting with the user. An activity can frequently go between the
resumed and paused states -- for example when the device goes to sleep, when an
activity result is delivered, when a new intent is delivered -- so the code in these
methods should be fairly lightweight.
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.
34
NIT,Kurukshetra Android Operating System
35
NIT,Kurukshetra Android Operating System
36
NIT,Kurukshetra Android Operating System
Android Development Tools (ADT) plugin for Eclipse adds powerful extensions to the
Eclipse integrated development environment. It allows you to create and debug Android
applications easier and faster.
37
NIT,Kurukshetra Android Operating System
In Eclipse, the ADT plugin gives you an incredible boost in developing Android applications:
• It gives you access to other Android development tools from inside the Eclipse IDE.
For example, ADT lets you access the many capabilities of the DDMS tool: take
screenshots, manage port-forwarding, set breakpoints, and view thread and process
information directly from Eclipse.
• It provides a New Project Wizard, which helps you quickly create and set up all of the
basic files you'll need for a new Android application.
• It automates and simplifies the process of building your Android application.
• It provides an Android code editor that helps you write valid XML for your Android
manifest and resource files.
• It will even export your project into a signed APK, which can be distributed to users.
The ADT plugin provides a New Project Wizard that you can use to quickly create a new Android
project (or a project from existing code).
after completing the New Project Wizard, ADT creates the following folders and files in new
project:
src/
Includes your stub Activity Java file. All other Java files for your application go here.
Includes the android.jar file that your application will build against. This is determined by the
build target that you have chosen in the New Project Wizard.
38
NIT,Kurukshetra Android Operating System
gen/
This contains the Java files generated by ADT, such as your R.java file and interfaces created
from AIDL files.
assets/
res/
A folder for your application resources, such as drawable files, layout files, string values, etc.
AndroidManifest.xml
default.properties
This file contains project settings, such as the build target. This files is integral to the project,
as such, it should be maintained in a Source Revision Control system. It should never be
edited manually — to edit project properties, right-click the project folder and select
"Properties".
1. First, you need to select a Deployment Target. To view available targets, execute:
id:1
Name: Android 1.1
Type: platform
API level: 2
39
NIT,Kurukshetra Android Operating System
Find the target that matches the Android platform upon which you'd like to run your
application. Note the integer value of the id — you'll use this in the next step.
3. Next, you'll be asked whether you'd like to create a custom hardware profile. If you
respond "yes," you'll be presented with a series of prompts to define various aspects
of the device hardware (leave entries blank to use default values, which are shown in
brackets). Otherwise, press return to use all default values
To run (or debug) your application, select Run > Run (or Run > Debug) from the Eclipse
main menu. The ADT plugin will automatically create a default launch configuration for the
project.
When you choose to run or debug your application, Eclipse will perform the following:
1. Compile the project (if there have been changes since the last build).
2. Create a default launch configuration (if one does not already exist for the project).
3. Install and start the application on an emulator or device
To create or modify a launch configuration, follow these steps as appropriate for your Eclipse
version:
40
NIT,Kurukshetra Android Operating System
By default, a run configuration uses the automatic target mode in order to select an AVD. In
this mode, ADT will select an AVD for the application in the following manner:
1. If there's a device or emulator already running and its AVD configuration meets the
requirements of the application's build target, the application is installed and run upon it.
2. If there's more than one device or emulator running, each of which meets the requirements of
the build target, a "device chooser" is shown to let you select which device to use.
3. If there are no devices or emulators running that meet the requirements of the build target,
ADT looks at the available AVDs. If one meets the requirements of the build target, the AVD
is used to launch a new emulator, upon which the application is installed and run.
4. If all else fails, the application will not be run and you will see a console error warning you
that there is no existing AVD that meets the build target requirements.
However, if a "preferred AVD" is selected in the run configuration, then the application
will always be deployed to that AVD. If it's not already running, then a new emulator will be
launched.
41
NIT,Kurukshetra Android Operating System
12. APPLICATION:
A central feature of Android is that one application can make use of elements of other
applications.
Android breaks down the barriers to building new and innovative applications. For example,
a developer can combine information from the web with data on an individual's mobile phone
such as the user's contacts, calendar, or geographic location -- to provide a more relevant user
42
NIT,Kurukshetra Android Operating System
experience. With Android, a developer could build an application that enables users to view
the location of their friends and be alerted when they are in the vicinity giving them a chance
to connect.
Android enables developers to obtain the location of the device, and allows devices to
communicate with one another enabling rich peer-to-peer social applications. In addition,
Android includes a full set of tools that have been built from the ground up alongside the
platform providing developers with high productivity and deep insight into their applications.
Some of the applications available on the latest android os supporting mobiles are:-
1.Beetaun
Beetaun allows users to tag locations around a city, then browse through maps of what other
people have found interesting. Unlike GPS units where points of interest are stores and other
brick-and-mortar locales, Beetaun tags could be anything from a particularly picturesque
viewpoint, to a farmer’s market, to a story about something that happened at a place.
2.BreadCrumbz
BreadCrumbz helps create directions for the orienteering-challenged by snapping first-person
photos of a route. Spoken voice can record directions to accompany the route. Besides
creating alternatives to the traditional map-based approach, BreadCrumbz also serves as a
substitute navigation system when GPS isn’t available, like indoors. BreadCrumbz gives
guests a picture-by-picture path straight to door.
3. Wikitude
Wikitude actually boasts an “augmented reality cam” which will peg items in your
photograph that have Wikipedia entries about them. For example, taking a picture of a
mountain range allows it to label each mountain and show you more information on each one
with further clicking.
4.ShapeWriter
ShapeWriter’s new method for typing with a screen. The premise rather than tapping all the
letters you need to make a word, why not string them all together with a single finger drag,
then let software figure out which ones you wanted to use? It’s gesture-based typing.
43
NIT,Kurukshetra Android Operating System
5.ShopSavvy
ShopSavvy’s use of the G1’s built-in camera as a barcode reader and GPS. The photo of the
UPC on the item is to be snapped and ShopSavvy will not only give the best price on the
Web,best price on the nearby stores is given.
6.Locale
This is one of those clever uses for a location-aware phone. It allows to set phone to behave
differently in different places. It stops taking calls from the boss. It sets a reminder to plug
battery in if it is only 30% charged at home. If only we could get a universal version of this
that will shuteverybody’s phone off at movie theatres.
7.Wertago
Besides offering a directory of hot venues in any given city Wertago will allow users to swap
messages and pictures, set up profiles, and ultimately, meet up on the town.
8.CitySlikkers
Productivity tools are great, but at the end of the day, everybody loves a good game. Android
owners will play within the cities they actually live in, which will be represented to them
using 3D maps tapped into GPS. The makers even envision people meeting up at real-life
locations that represent in-game sites.
9.ShareYourBoard
ShareYourBoard makes it easier to pull all the sloppily illustrated ideas that end up on those
office whiteboards and spread them around on the Web. ShareYourBoard will detect the
edges of the whiteboard photo you shoot, lay it flat, adjust the image for legibility, then
thumbnail it with others for easy browsing
10.Piggyback
Piggyback breaks the agonizing process of preplanning by showing rideshare possibilities in
real time. Drivers see possible passengers along their routes, and passengers see possible
rides. It will even keep track of how far we take a passenger, divvy up gas costs
automatically, and then handle the transaction automatically every month via PayPal.
44
NIT,Kurukshetra Android Operating System
13. LIMITATIONS:
The unrestrictive terms of Android's license have allowed corporations using Android
to place restrictions on their own customers. As an example, tethering (PC or laptop
internet connectivity via the cell phone) is forbidden by T-Mobile USA, and the
Android Market has de-listed such applications for T-Mobile customers.This also
means that the apps can be carrier-specific as chosen by Google.
Android uses Linux as its kernel, but according to Google, it is not a conventional
Linux distribution. It does not have a native X Window System, nor does it support
45
NIT,Kurukshetra Android Operating System
the full set of standard GNU libraries like its system libraries (GNU C Library). This
specific modification makes it difficult to reuse existing Linux applications or
libraries on Android.
Android does not use established Java standards, i.e. Java SE and ME. This prevents
compatibility among Java applications written for those platforms and those for the
Android platform. Android only reuses the Java language syntax, but does not provide
the full-class libraries and APIs bundled with Java SE or ME.
Android does not officially allow apps to be installed on, nor run from, an SD card.
Current Android products such as the HTC Dream and Magic have limited onboard
memory and many users feel restricted by this lack of functionality. Several
unsupported modifications exist, however, to give the user this capability.
Android is criticized for its multitasking abilities and the lack of a significant driver
base. For these reasons ARM and Real have expressed doubt that it will gain a major
market share as a netbook OS.
Android has been criticized by some because it is not really free or open-source
software despite what was announced by Google. Some parts of the SDK are still
proprietary and closed source, and some believe it is a conscious decision to control
the platform by Google.
software installed by end-users must be written in Java, and will not have access to
lower level device API's. This provides end-users with less control over their phone's
functionality than other free and open source phone platforms, such as OpenMoko.
14.FUTURE ASPECTS:
Android is of future use. Some of the future use of the android operating system is:
The most likely option for HP would be to use the open source operating system on a new
line of HP Netbooks, which would make complete sense.
46
NIT,Kurukshetra Android Operating System
At the moment Android is a popular operating system for mobile phones but it’s no secret
that Google is keen to expand the use of Android and has been working with many different
PC makers to get their operating system onto Netbooks.
Having Android on Netbooks seems like an obvious course of action too as it would make it
easier for users of Android powered phones to share information between devices.
Netbooks are now the fastest growing segment of the PC market and this isn’t likely to
change in the near future, particularly with the current economic climate. Netbooks are
portable, functional and don’t cost the earth to buy. Indeed, “good enough to use and cheap
enough to lose” as the early techies used to say about Netbooks.
Netbooks usually come with either Microsoft XP or Linux operating systems preinstalled.
If HP goes ahead and uses Google’s Android, it would put Google right on course to become
a major contender in the Netbook war and will give Microsoft a run for its money.
Google’s Android-based operating system can be used on the intel’s future Moorestown- or
generic Atom-powered MIDs (Mobile Internet Devices).
Intel’s goals are to create a platform and ecosystem to support all operating systems in all
types of devices. These Intel-powered devices from the low-end to the high-end would
benefit not only the end-users, but also the industry and vendors.
15. CONCLUSION:
47
NIT,Kurukshetra Android Operating System
Its custom virtual machine optimize memory and hardware resources in a mobile
environment.; it can be liberally extended to incorporate new cutting edge technologies as
they emerge. The open source platform will continue to evolve as the developer community
works together to build innovative mobile applications.Thus making it a platform to develope
various innovative applications.Android today is participating in many successful open
source project.
It makes web browsing really very easy on the phones with the help of the webkit engine
which adds web browsing components to the application and various features of web
browser.
Google Android is stepping into the next level of the future internet. It makes the mobile
platform advanced by entering features like EDGE technology,bluetooth
,wi.fi,accelerometer,magnetometer. With the help of all these technology we can say its the
mobile platform of the future use.
16. REFERENCES:
48
NIT,Kurukshetra Android Operating System
YouTube: Androidology
Official website-http://www.androiddeveloper.com/
www.wikipedia.org
49