Android Architecture

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Introduction:

Android is a mobile operating system


running on the Linux kernel. It was initially developed by Android Inc.,
a firm later purchased by Google, and lately by the Open Handset
Alliance. It allows developers to write managed code in the Java
language, controlling the device via Google-developed Java libraries.
With Google’s latest launch for mobile
Android Operating System, we did a project starting from ABC of it up to
Creating Basic Application. Here we are describing about Android,
features, capabilities, application, what we developed, current market
scenario and future plans. With Android, mobile phone has achieved its
3rd generation and brand in 21st century. To cop up with the
latest technology in mobile phone’s world lets start the journey of Android.
The unveiling of the Android
distribution on 5 November 2007 was announced with the founding
of the Open Handset Alliance, a consortium of47 hardware,
software and telecom companies
Android Architecture:
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. See
the figure on next page.

System 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 listed below:
System C library - a BSD-derived implementation of the standard C
system library (libc), tuned for embedded Linux-based devices
Media Libraries - based on PacketVideo's OpenCORE; 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
FreeType - bitmap and vector font rendering
SQLite - a powerful and lightweight relational database engine available to all
applications

Development Toolkit:

• SDK (Software Development Kit)


• Eclipse
• ADT Plugin
• DrawDroid
Android SDK:

The Android SDK includes a comprehensive set of


development tools. These include a debugger, libraries, a handset
emulator (based on QEMU), documentation, sample code, and tutorials.
Currently supported development platforms include x86- architecture
computers running Linux (any modern desktop Linux distribution), Mac OS
X 10.4.8 or later, Windows XP or Vista. Requirements also include Java
Development Kit, Apache Ant, and Python 2.2 or later. The officially supported
integrated development environment (IDE) is Eclipse (3.2 or later) using the
Android Development Tools (ADT) Plugin, though developers may use any text
editor to edit Java and XML files then use command line tools to create, build
and debug Android applications.

In 26th October, 2009 the "Eclair" version (2.0) was released which featured
better search, battery usage indicator and VPN control
applet. New platform technologies included...

Optimized hardware speed


_ Support for more screen sizes and resolutions
_ Revamped UI
_ New browser UI and HTML5 support _ New contact lists
_ Better white/black ratio for backgrounds _ Improved
Google Maps
_ Microsoft Exchange support _ Built in flash support for camera _
Digital Zoom
_ Improved virtual keyboard _ Bluetooth 2.1

ADT Plugin:
The 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. If you
use 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 breakpoints, and view thread and process information
d irectly from Eclipse.• It provides a New Project Wizardd, which helps you
quickly create and set up all of the basic you will need for a new andriod
application.It automates and simplifies the process of building your Android
application It will even export your project into a signed APK, which can be
distributed to users.
The Android SDK includes a mobile device emulator -- a virtual mobile device
that runs on your computer. The emulator lets you prototype, develop, and
test Android
applications without using a physical device.

The Android Emulator


The Android Emulator is hardware and software features of a typical
mobile device, except that it cannot receive or place actual phone calls. It
provides a variety of navigation and control keys, which you can "press" using
your mouse or keyboard to generate events for your application. It also
provides a screen in which your application is displayed, together with any
other Android applications running.
To let you model and test your application more easily, the emulator
supports Android Virtual Device (AVD) configurations. AVDs let you specify the
Android platform that you want to run on the emulator, as well as the
hardware options and emulator skin files tht you want to use. Once your
application is running on the emulator, it can use the services of the
Android platform to invoke other applications, access the network, play audio
and video, store and retrieve data, notify the user, and render graphical
transitions and themes.
The emulator also includes a variety of debug capabilities, such as a
console from which you can log kernel output, simulate application interrupts
(such as arriving SMS messages or phone calls), and simulate latency effects
and dropouts on the data channel.

Emulator Limitations:

• No support for placing or receiving actual phone calls. You can


simulate phone calls(placed and received) through the emulator console,
however.
• No support for USB connections
• No support for camera/video capture (input).
• No support for device-attached headphones
• No support for determining connected state
• No support for determining battery charge level and AC charging
state
• No support for determining SD card
insert/eject
• No support for Bluetooth
Android Applications are packaged in .apk format and stored under
/data/app folder on the Android OS. The user can run the command adb root to
access this folder as only the root has permissions to access this folder.
Voice Recognition Activity class Voice Recognition Activity is startup activity
defined as launcher in AndroidManifest.xml

file. REQUEST_CODE is static integer variable, declared on the beginning of


activity and used to confirm response when engine for speech recognition is
started. REQUEST_CODE has positive value. Results of recognition are saved in
variable declared as ListView type. Method onCreate is called when activity is
initiated.This is where the most initialization goes:

setContentView (R.layout.voice_recognition)

is used to inflate the user interface defined in

res > layout > voice_recognition.xml,

and findViewById(int)

to programmatically interact with widgets in the user interface. In this method


there is also a check whether mobile phone, on which application is installed, has
speech recognition possibility. Package Manager is class for retrieving various
kinds of information related to the application packages that are currently
installed on the device.

FunctiongetPackageManager() returns PackageManager instance to find global


package information. Using this class, we can detect if the phone has a
possibility for speech recognition. If a mobile device doesn’t have one of many
Google’s applications which integrate speech recognition, further work of this
application Voice SMS will be disabled and message on the screen will be
“Recognizer not present”. Recognition process is done trough one of Google’s
speech recognition applications. If recognition activity is present user can start
the speech recognition by pressing on the button and thus launching
startActivityForResult(Intent intent, int requestCode).

The application uses startActivityForResult() to broadcast an intent that requests


voice recognition, including an extra

parameter that specifies one of two language models. Intent is defined with

intent.putExtra(RecognizerIntent.)EXTRA_LANGUAGE_MODEL,RecognizerIntent.LANGUAGE_MODEL_FREE_FOR
M).

The voice recognition application that handles the intent processes the
voice input, then passes the recognized string back to Voice SMS application by
calling the onActivityResult() callback. In this method we manage result of
activity startActivityForResult. Received result Data is stored in ListView variable
and shown on the screenthe data associated with the string "key" which in
this case is selected text from recognition Testing Figure 4. Interface for sending
SMS activity. The text is entered in the space for writing messages and displayed
on the screen. By clicking the Send SMS button application checks whether the
message and the number of recipient are entered to perform sending of message.
When cursor is positioned in the space for recipient number from

contacts, button attribute visibility is changed from default gone to visible.


Pressing the button the

command that allows you to enter the contact numbers.

label Intent forContacts new Intent


=(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI)

startActivityForResult (forContacts, REQUEST_CODE)

is executed. After selecting desired action can be done

You might also like