ANDROID PROJECT REPORT
1
OUTLINE
1. Introduction of Android Technology
1.1 android (what ???)
1.2 What does android include?
1.3 Features of Android
1.4 Android and others
1.5 Android application development
1.6 Android development
1.7 Why and How ?
2 Android Version
Android Software and Installation
Android Architecture
Android SDK Tools
Plug-in with Eclipse
Hello Android..
Program Description
Process Life Cycle
2
INTRODUCTION OF ANDROID TECHNOLOGY
ANDROID (WHAT ???)
Operating Systems have developed a lot in last 15 years. Starting from black and white
phones to recent smart phones or mini computers, mobile OS has come far away. Especially
for smart phones, Mobile OS has greatly evolved from Palm OS in 1996 to Windows pocket
PC in 2000 then to Blackberry OS and Android.
One of the most widely used mobile OS these days is ANDROID. Android is a software
bunch comprising not only operating system but also middleware and key applications.
Android Inc was founded in Palo Alto of California, U.S. by Andy Rubin, Rich miner,
Nick sears and Chris White in 2003. Later Android Inc. was acquired by Google in
2005. After original release there have been number of updates in the original version of
Android.
3
WHAT DOES ANDROID INCLUDE?
Developing language is Java
Uses Linux kernel (Open Source)
Provides a development kit (SDK)
Supports Emulator
Android uses the Dalvik virtual machine (DVM)
Use Eclipse IDE to run application
FEATURES
Application Framework is used to write applications for Android. The framework is
supported by numerous open source libraries such as openssl, sqlite and libc. It is also
supported by the Android core libraries. From the point of security, the framework is
based on UNIX file system permissions that assure applications have only those
abilities that mobile phone owner gave them at install time.
Dalvik virtual machine it is extremely low-memory based virtual machine, which
was designed specially for Android to run on embedded systems and work well in low
power situations. The Dalvik VM creates a special file format (.DEX) that is created
through build time post processing. Conversion between Java classes and .DEX
format is done by included dx tool.
SQLite extremely small (~500kb) relational database management system, which is
integrated in Android. It is based on function calls and single file, where all
4
definitions, tables and data are stored. This simple design is more than suitable for a
platform such as Android.
Integrated browser in my opinion, Google made a right choice on choosing WebKit
as open source web browser.
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 Wi-Fi (hardware dependent)
Camera, GPS (hardware dependent)
Rich development environment including a device emulator, tools for debugging,
memory and performance profiling, and a plugin for the Eclipse IDE
ANDROID AND OTHERS
5
The Players
Android Open source mobile OS developed by the Open Handset Alliance led by
Google. Based on Linux 2.6 kernel
iOS Apples proprietary mobile OS, iPhone, iPod Touch, iPad. Derived from OS X,
very UNIX like
Symbian acquired by Nokia 2008
Windows Phone 7 Microsoft Kin, discontinued 6 weeks after initial launch
Blackberry OS RIM (Research in Motion), proprietary OS
Android is better than Blackberry
6
Performance
1. Blackberry - Quick and somewhat stable. Typically Id have to do a battery pull
every few days. The re-boot time is ridiculous - sometimes 8 minutes.
2. Android - Quick with no lag or hesitation. I do not think I have ever had to take the
battery out, unless swapping for another one. Boot time is quick.
Battery
1. Blackberry The battery life on a Blackberry is fantastic. However keep in mind that
it is not doing much.
2. Andorid Not so good. I can make it through a full day sometimes. However I
find that I am doing A LOT more with my phone. There are threads upon threads on
Androids battery issues. I If there is something at which Android can improve, its
battery life.
Email
1. Blackberry - This is what RIM / Blackberry is known for. Gmail on BB is starting to
improve but does not hold a candle to Android. If youre not on BES this really does
not matter to you.
2. Android - So far email is pretty good. Emails are almost instant with Exchange.
Gmail however EXCELS (of course, it is a Google!).
User Interface (UI)
1. Blackberry - Not much to say here. Its tried and true. No glitz and glam. It does
what it is supposed to. I now refer to this as the DOS phone.
2. Android - Wow! What the hell have I been smoking that has caused me not to move
us all over to the Android side? Two words: Love it!
**Note User interface really is a matter of personal preference rather than a question of
better or worse.
Web Browsing
1. Blackberry Painful to browse the web. If youre stuck with it, at least it accesses the
web.
2. Android - This is where Android DOMINATES. Web browsing is night and day
compared to Blackberry and by that I mean wonderful.
Apps
7
1. Blackberry More and more apps are showing up, but the iPhone OS is keeping it
behind. It will be interesting to see what Blackberry can do to start competing with
Android and Apple OS.
2. Android Dominates again. More and more apps that are loved on Apple iOS are
already making their way to Android. Android is right up there with iOS.
Is android better than ios
Browsing
Let me first say I do like the Safari browser on the iPhone. Its fast, its reliable, its
stable. But flexible? Flash? Monopolistic? Yes Safari is the only browser for the
iPhone, and that browser still does not do Flash.
However, the Android browser is one of the best browsers on the mobile market. On
my HTC Hero, I have Opera Mini, Dolphin, and the default Browser. Dolphin is
outstanding, with its use of Tabs and Gestures.
PC connection
Unlike the iPhone, you dont need to have iTunes to manage your phone. Android
cant sync with the Linux desktop yet. Thats okay for now. But Android can mount
the SD card so that it is usable (via drag and drop) by any operating system.
Multi-notification
One of the issues Ive always had with the iPhone is its notification system. Basically,
it depends upon a single system that not all applications have access too. For
instance, if you are a Twitterer, you can find out if you have updates only by
opening the Twitter app on the iPhone.
With Android, the apps have access to the notification system and can all report.
The notification bar on the Android phone can alert you to new voice messages, email
messages, Facebook notifications, new Gmail, new text messages, and much more. If
an app has a notification, it can let you know quickly, and in the
background.With the iPhone, youre pretty much limited to what Apple says.
Market
Yes, Apple has an app for that. But so does Android. And chances are, the Android
app is free and works as well (or better) than the iPhone app. And, believe it or
not, there are thousands of apps in the Android Market. Apple does not (at least
yet) have a patent on an application for just about everything. Give it time though.
And installing applications on your Android phone is actually easier than it is on
the iPhone.
Google integration
8
This one is almost not fair, since Android was built with the intention of
integrating with Google. But wow does it integrate well. Want to search Google?
Simply click the search button, enter your search string, and youre off and running.
Did I mention Google Voice? Yes, the Android has an app for that.
Open Source
Why does being open make Android better than iPhone? For the same reason that
being open helps Linux: a planet full of developers with the ability to aid Androids
developers. Anyone can get access to the source of Android to better the system. This
is also a double-edged sword, in that it allows those will less-than-ideal intentions
to discover any weakness of the phone. But that can be seen as an indirect plus
because when weaknesses are found in the open source community, they are quickly
fixed. I assume that this tradition will extend to the Android phone. iPhone open?
NO
Open to carriers
This is yet another reason why Android is superior.
If you want an iPhone (at least for the time being), you better be open to AT&T. If you
dont like AT&T and you still want an iPhone, you better be open to doing a little jail
breaking or move to another country. If you want an Android phone, you can join any
number of carriers and have your choice of any number of outstanding phones using
Android. No lock down.
GPS Navigation
Android phones have offered free, voice-guided GPS for a long, long time. Its
actually been offered as a standard component of Android since October 2009,
whereas iOS Maps app demands the user look at their iPhone or iPad as they drive
no good.
Still, the iPhone has a few decent third-party apps that offer turn-by-turn voice
guidance, but Androids built-in functionality allows users to jump seamlessly
into navigation from other apps. This kind of functionality simply doesnt exist
on iOS, as users have to manually copy and paste the address into the app of choice.
Not efficient, and certainly not seamless.
Setting Default Apps
9
On Android, you get to decide what apps do what. Like a particular
browser? Make it the default one. Is there a particular music player
that suits your needs best? You get the picture. On Android, if you
want to use alternative apps for virtually anything from mail, to
Web browsing or even navigation, you can set them to be the
default for all the related functions. Its a small thing, but in reality,
its a life saver, and one more reason why you are the boss of your
Android device. Nice, isnt it?
Angry Birds is Free Yep! On Android, all three versions of Angry
Birds are free, unlike on iOS where they are $1 each.
What is Android
Android is an open source operating system, created by Google specifically for use on
mobile devices (cell phones and tablets)
Linux based (2.6 kernel)
Can be programmed in C/C++ but most app development is done in Java (Java access
to C Libraries via JNI (Java Native Interface))
Supports Bluetooth, Wi-Fi, and 3G and 4G networking
ANDROID APPLICATION DEVELOPMENT
10
ANDROID DEVELOPMENT
ANDROID (WHY ???)
11
12
ANDROID VERSION
Version History
The version history of the Android operating system began with the release of the
Android 1.0 (Beta) in November 2007
It has seen a number of updates to its base
Operating system since its original release.
These versions have released in alphabetical order.
These updates typically fix bugs and add new features
Android 1.0 (Beta)
13
Android 1.1
On 9 February 2009
The update resolved bugs.
Ability to save attachments in messages
Support added for marquee in system layouts
1.5 Cupcake
Support for third-party virtual keyboards
Support for Widgets
Animated screen transitions
Auto-pairing and stereo support for Bluetooth.
1.6 Donut
On 15 September 2009, the Android 1.6 SDK Donut was released, based on Linux
kernel 2.6
14
Voice and text entry search enhanced to include bookmark history, contacts, and the
web
Speed improvements in searching and camera applications
Gallery, camera and camcorder more fully integrated, with faster camera access
Ability for users to select multiple photos for deletion
Android 2.0/2.1 clair
15
The Motorola Droid introduced Android 2.0 On 26 October 2009
Ability to tap a Contacts photo and select to call, SMS, or email the person
Ability to search all saved SMS and MMS messages, with delete oldest messages in a
conversation automatically deleted when a defined limit is reached
Numerous new camera features, including flash support, digital zoom, scene mode,
white balance, color effect and macro focus
Allowing multiple accounts to be added to a device for email and contact
synchronization
The 2.1 SDK was released on 12 January 2010
Including minor amendments to the API and bug fixes
16
Android 2.2 Froyo
Speed, memory, and performance optimizations
Integration of Chrome's
USB tethering and Wi-Fi hotspot functionality
Voice dialing and contact sharing over Bluetooth
Support for numeric and alphanumeric passwords
Support for file upload fields in the Browser application
Support for installing applications to the expandable memory
Adobe Flash support
Android 2.3.x Gingerbread
17
Released On 6 December 2010
Support for extra-large screen sizes and resolutions
Faster, more intuitive text input in virtual keyboard, with improved accuracy, better
suggested text and voice input mode
Enhanced copy/paste functionality, allowing users to select a word by press-hold,
copy, and paste
Concurrent garbage collection for increased performance
Native support for more sensors.
Version 2.3.4 introduced support for voice or video chat using Google Talk.
3.x Honeycomb
18
The Motorola Xoom tablet introduced Android 3.0.1 Honeycomb On 22 February
2011
The first Tablet has been released by the help of this version
Optimized tablet support
Redesigned keyboard, making typing fast, efficient and accurate on larger screen
sizes
Multitasking support
Quick access to camera exposure, focus, flash, zoom, front-facing camera, and more
Ability to view albums and other collections in full-screen mode in Gallery, with easy
access to thumbnails for other photos
New two-pane Email UI to make viewing and organizing messages more efficient,
allowing users to select one or more messages
19
Support for video chat using Google Talk
Support for multi-core processors
Support for joysticks
4.x Ice Cream Sandwich
The Galaxy Nexus introduced Android 4.0.1 Ice Cream Sandwich 19 October 2011
Enhanced speed and performance
Virtual buttons in the UI, in place of capacitive or physical buttons
Easier-to-create folders, with a drag-and-drop style
Pinch-to-zoom functionality in the calendar
20
Built-in photo editor
New gallery layout, organized by location and person
Resizable widgets
Improved camera app with zero shutter lag, time lapse settings, panorama mode, and
the ability to zoom while recording
4.1 Jelly Bean
Faster, Smoother, More Responsive
Enhanced Accessibility
Support for International Users
Bi-Directional Text and Other Language Support
User-installable keymaps
New Ways to Create Beautiful UI
Expandable notifications
21
Resizable app widgets
Simplified task navigation
Easy animations for Activity launch
Transitions to Lights Out and Full Screen Modes
New types of remoteable Vi
22
23
ews
Live wallpaper preview
Higher-resolution contact photos
put Types and Capabilities
Animation and Graphics
Vsync for apps
New animation actions and transition types
New Types of Connectivity
Android Beam
Wi-Fi Network Service Discovery
Wi-Fi Direct Service Discovery
Network Bandwidth Management
New Media Capabilities
Media codec access
USB Audio
Audio record triggering
Multichannel audio
Audio preprocessing
Audio chaining
Media Router
Renderscript Computation
Android Browser and WebView
Google APIs and services
24
Google Cloud Messaging for Android
App Encryption
Smart App Updates
Google Play services
SOFTWARE FOR ANDROID
Java with jdk1.6
Eclipse IDE 3.6.2
Android Set up (Android Installer Package)
.How..
Preparing Your Development Computer
Step 1 Install: JDK
25
Step 2 Install: Eclipse
Eclipse IDE for Java Developers
26
Installing Android SDK
Goto: http://developer.android.com/sdk/index.html
Download versions based on your platform:
If youre using windows, you must use android-sdk_r09-
windows.zip (instead of exe installer)
If you unzip it, youll have android-sdk-windows
Make a note of the name and location of the SDK directory on your
system.
Android SDK
A software development kit that enables developers to create applications for the
Android platform. The Android SDK includes sample projects with source code,
development tools, an emulator, and required libraries to build Android applications.
27
Applications are written using the Java programming language and run on Dalvik, a
custom virtual machine designed for embedded use which runs on top of a Linux
kernel.
ANDROID-SDK-WINDOWS
This Folder contains the files--
Installing Android SDK
Goto android-sdk-windows, and run SDK Manager.exe
It will display a list of available components:
where you can select sdk version according to your requirement.
A dialog appears like this
28
Click on the install packages
The next dialog appears
29
Click on the install accept all and then install
ANDROID ARCHITECTURE
30
Linux Kernel
31
Works as a HAL(Hardware Abstraction Layer)
Device drivers
Memory management
Process management
Networking
Libraries
C/C++ libraries
Interface through Java
Surface manager Handling UI Windows
2D and 3D graphics
Media codecs, SQLite, Browser engine
Android Runtime
Dalvik VM
Dex files
32
Compact and efficient than class files
Limited memory and battery power
Core Libraries
Java 5 Std edition
Collections, I/O etc
Application Framework
API interface
Activity manager manages application life cycle.
Applications
Built in and user apps
Can replace built in apps
THE DALVIK VIRTUAL MACHINE
33
Interpreter only machine optimized for use on low powered, low memory devices like
phones
Dalvik uses the Java programming language but not the JVM
Dalvik is not a Java virtual machi
It uses bytecode format called dex.
APPS AND WIDGETS
34
Highest layer in the Android architecture
End users see only apps and widgets
App
widget (music player)
ANDROID SDK TOOLS
35
The Android SDK includes a variety of tools that help you develop mobile
applications for the Android platform
SDK tools are platform independent and are required no matter which Android
platform you are developing on.
The SDK tools are required if you are developing Android applications.
The SDK tools are installed with the SDK starter package and are periodically
updated.
The most important SDK tools include the Android SDK and AVD Manager
(android), the emulator (emulator), and the Dalvik Debug Monitor Server (ddms).
A short summary of some frequently used SDK tools are-
Android (Android SDK and AVD Manager )
Lets you manage AVDs, projects, and the installed components of the SDK.
Dalvik Debug Monitor Server (ddms)
Lets you debug Android applications
Android Emulator (emulator)
An emulation tool that you can use to design, debug, and test your applications in an
actual Android run- time environment.
Hierarchy Viewer (hierarchyviewer)
Lets you debug and optimize an Android application's user interface.
layoutopt
Lets you quickly analyze your application's layouts in order to optimize them for
efficiency.
sqlite3
Lets you access the SQLite data files created and used by Android applications.
HELLO ANDROID
36
Hello, Android
37
Select File>New>Project>, and open new project dialog box
Running Hello, Android on Emulator
Creating an AVD (Android Virtual Device)
38
1. Eclipse: Windows > Android SDK and AVD Manager
2. Click New button, and fill out the fields
1. Name: em22
-- specify your preferred name
1. Target: Android 2.2 API Level 8
-- specify Android target version
1. SDCard: 64
-- specify SD card memory size
1. Skin: Default (HVGA)
-- specify display mode
Running Hello, Android on Emulator
Right Click the project > Run As > Android Application
39
Result on Emulator
INTENT
40
Intent messaging is a facility for late run-time binding between components in the
same or different applications.
An intent might convey a request for an activity to show an image or to open a web
page.
It is basically a passive data structure holding an abstract description of an action to
be performed.
It can be used with startActivity() to launch an Activity
ACTIVITY LIFE CYCLE
41
LAYOUTS
Android application user interfaces are defined using layouts.
A type of resource that defines what is drawn on the screen as well as how a screen
will look.
42
A layout resource is simply a template for a user interface screen, or portion of a
screen
A type of View class whose primary purpose is to organize other controls i.e; child
controls, such as text controls or buttons or images on the screen.
Layout resources are stored as XML files in the /res/layout resource directory for the
application.
There are a number of different types of layout that can be used to organize controls
on a screen, or portion of a screen.
The most commonly used layout s are.-
1.Linear Layout
designed to display child View controls (such as text, edit text, etc) in a single row
or in a single column.
2. Frame Layout
This layout is designed to display a stack of child View controls.
Multiple view controls can be added to this layout.
This can be used to show multiple controls within the same screen space.
3.Relative Layout
Designed to display child View controls in relation to each other.
For example,
you can set a control to be positioned above or below or to the left of or to the
I right of another control, referred to by its unique identifier.
4. Table Layout
Designed to organize child View controls into rows and columns.
Individual View controls are added within each row of the table using a Table Row
layout View (which is basically a horizontally oriented Linear Layout) for each row of
the table.
DIALOGS
A dialog is usually a small window that appears in front of the current Activity.
The underlying Activity loses their focus and the dialog accepts all user interaction.
43
The Dialog class is the base class for creating dialogs
Dialogs are normally used for notifications that should interrupt the user and to
perform short tasks (such as a progress bar or a login prompt).
As Dialog is the base class. However, you typically should not instantiate a Dialog
directly. Instead, you should use one of the following subclasses---
1.AlertDialog
A dialog that can manage zero, one, two, or three buttons, or a list of selectable items
that can include checkboxes or radio buttons.
2.ProgressDialog
A dialog that displays a progress wheel or progress bar. Because it's an extension of
the AlertDialog, it also supports buttons.
3.DatePickerDialog
A dialog that allows the user to select a date.
4.TimePickerDialog
A dialog that allows the user to select a time.
WIDGETS
One of the biggest advantages of Android over iPhone is widgets.
44
A widget can display an application's most timely or otherwise relevant information at
a glance, on a user's Home screen such as Calendar, Analogclock, Twitter widget,
Message widget, etc
Android 3.1, app widgets can be resizable
horizontally and/or vertically.
As of Android 4.0, app widgets have margins automatically applied.
REFERENCES
http://www.google.com/
http://developer.android.com/
http://nexsoftware.net/wp/2009/07/29/tutorial-creating-a-custom-analogclock-widget/
http://www.vogella.de/articles/Android/article.html
45