Você está na página 1de 24

Android Introduction

Platform Overview

@2011 Mihail L. Sichitiu 1


What is Android?

 Android is a software
stack for mobile devices
that includes an
operating system,
middleware and key
applications.

@2011 Mihail L. Sichitiu 2


 Software platform from Google and the
Open Handset Alliance
 July 2005, Google acquired Android, Inc.
 November 2007, Open Handset Alliance
formed to develop open standards for
mobile devices
 October 2008, Android available as open
source

@2011 Mihail L. Sichitiu 3


Android and the Hardware

 Built-in Apps ≡ Apps created in SDK


 Leverage Linux kernel to interface with
hardware
 Open source platform promotes
development from global community
 What is the Open Handset Alliance
(OHA)? (1)

 → It's a consortium of several


companies

@2011 Mihail L. Sichitiu 5


Application Components
 Activity
◦ Present a visual user interface for one focused endeavor the user can undertake
◦ Example: a list of menu items users can choose from
 Services
◦ Run in the background for an indefinite period of time
◦ Example: calculate and provide the result to activities that need it
 Broadcast Receivers
◦ Receive and react to broadcast announcements
◦ Example: announcements that the time zone has changed
 Content Providers
◦ Store and retrieve data and make it accessible to all applications
◦ Example: Android ships with a number of content providers for common data types
(e.g., audio, video, images, personal contact information, etc.)
 Intents
◦ Hold the content of a message
◦ Example: convey a request for an activity to present an image to the user or let the user
edit some text
Installation
 http://developer.android.com/sdk/installing.html
 Preparing your system and system
requirements
 Downloading and Installing the SDK
 Installing ADT plug-in for Eclipse
 Adding Platforms and Components
 Exploring the SDK
 Completing tutorials
 Troubleshooting
Android Features

 Reuse and replacement of components


 Virtual machine
 Integrated browser
 Optimized graphics
 SQLite
 Media support
 GSM Telephony
 Bluetooth, EDGE, 3G, and WiFi
 Camera, GPS, compass, and accelerometer
 Rich development environment

@2011 Mihail L. Sichitiu 8


Phones

HTC G1,
Droid, Motorola Droid (X)
Tattoo

Suno S880 Samsung Galaxy Sony Ericsson

@2011 Mihail L. Sichitiu 9


Tablets

Velocity Micro Cruz Gome FlyTouch Acer beTouch

Toshiba Android Cisco Android Tablet


Dawa D7 SmartBook

@2011 Mihail L. Sichitiu 10


@2011 Mihail L. Sichitiu 11
Architecture

@2011 Mihail L. Sichitiu 12


Android S/W Stack - Application

 Android provides a set of core applications:


 Email Client
 SMS Program
 Calendar
 Maps
 Browser
 Contacts
 Etc

 All applications are written using the Java language.

@2011 Mihail L. Sichitiu 13


Android S/W Stack –
App Framework

 Enabling
and simplifying the reuse of
components
 Developers have full access to the same
framework APIs used by the core applications.
 Users are allowed to replace components.

@2011 Mihail L. Sichitiu 14


Android S/W Stack –
App Framework (Cont)
 Features
Feature Role
View Used to build an application, including lists, grids, text
System boxes, buttons, and embedded web browser
Content Enabling applications to access data from other
Provider applications or to share their own data
Resource Providing access to non-code resources (localized strings,
Manager graphics, and layout files)
Notification Enabling all applications to display customer alerts in the
Manager status bar
Activity Managing the lifecycle of applications and providing
Manager a common navigation backstack

@2011 Mihail L. Sichitiu 15


Android S/W Stack - Libraries

 Includinga set of C/C++ libraries used by


components of the Android system
 Exposed to developers through the
Android application framework

@2011 Mihail L. Sichitiu 16


Android S/W Stack - Runtime

 Core Libraries
 Providing most of the functionality available in
the core libraries of the Java language
 APIs
 Data Structures
 Utilities
 File Access
 Network Access
 Graphics
 Etc @2011 Mihail L. Sichitiu 17
Android S/W Stack – Runtime
(Cont)
 Dalvik Virtual Machine
 Providing environment on which every Android
application runs
 Each Android application runs in its own process, with
its own instance of the Dalvik VM.
 Dalvik has been written such that a device can run
multiple VMs efficiently.

 Register-based virtual machine

@2011 Mihail L. Sichitiu 18


Android S/W Stack – Runtime
(Cont)
 Dalvik Virtual Machine (Cont)
 Executing the Dalvik Executable (.dex) format
 .dex format is optimized for minimal memory
footprint.
 Compilation

 Relying on the Linux Kernel for:


 Threading
 Low-level memory management

@2011 Mihail L. Sichitiu 19


Android S/W Stack – Linux Kernel

 Relying on Linux Kernel 2.6 for core system services


 Memory and Process Management
 Network Stack
 Driver Model
 Security
 Providing an abstraction layer between the H/W and the rest
of the S/W stack

@2011 Mihail L. Sichitiu 20


DEVELOPMENT TOOLS
The Android SDK includes a variety of custom tools that help
you develop mobile applications on the Android platform.Three
of the most significant tools are:

1.Android Emulator -A virtual mobile device that runs on


our computer -use to design, debug, and test our applications in
an actual Android run-time environment

2.Android Development Tools Plugin -for the Eclipse IDE -


adds powerful extensions to the Eclipse integrated environment

3.Dalvik Debug Monitor Service (DDMS) -Integrated with


Dalvik -this tool let us manage processes on an emulator and
assists in debugging
@2011 Mihail L. Sichitiu 21
Activity
 An Android activity
is focused on a
single thing a user
can do.
 Most applications
have multiple
activities

@2011 Mihail L. Sichitiu 22


Package Content
All source code here Java code for our activity

All non-code Generated Java code


resources Helps link resources to
Java code

Images Layout of the activity

Strings used in the


program

Android Manifest

@2011 Mihail L. Sichitiu 23


Goal
 Create a very simple
application
 Run it on a real
device
 Run it on the
emulator
 Examine its
structure

@2011 Mihail L. Sichitiu 24

Você também pode gostar