Sie sind auf Seite 1von 55

Mobile Application DevelopmentAndroid OS

An Open Platform for Mobile Devices

What To Expect
Mobile Computing Mobile Application Development (MAD) Android Platform & Features Android Architecture & its advantages Application Development Tools Application Design Considerations Application Building Blocks Hello Android Application

A Form of HCI where a computer is expected to be transported during normal usage.


Mobile computing has 3 aspects:

Mobile Computing

1. Mobile communication
The first aspect addresses communication issues in adhoc and infrastructure networks as well as communication properties, protocols, data formats and concrete technologies. The second aspect focuses on the hardware, i.e. mobile devices or device components. The third aspect deals with the characteristics and requirements of mobile applications.

2. Mobile hardware 3. Mobile software

Few reasons to go MAD


Smart Phones
Internet access anywhere Social networking Collaborative efforts

Millions of mobile users Open standards

What is Android ?
A software stack for mobile devices that includes an operating system, middleware and key applications. A Java-based operating system that runs on the Linux 2.6 kernel. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language .

What is Android ?
A free, open source S/W under Apache v2 License Industry can add proprietary functionality to their products without giving anything back to the platform Companies can remove functionality if they choose A Linux-based, multiprocess, multithreaded OS Android is not a device or a product Its not even limited to phones - you could build a DVR, a handheld GPS, an MP3 player, etc.
Android
Key Applications Middleware

Operating System (Linux Kernel 2.6)

What is Android ?

Why Android ?

Android: How it was Created


On the 5th of November 2007, the Open Handset Alliance, a
consortium of several companies which include Texas Instruments, Broadcom Corporation, Google, HTC, Intel, LG (Optimus One), Marvell Technology Group, Motorola, Nvidia, Qualcomm, Samsung Electronics, Sprint Nextel and T-Mobile was unveiled with the goal to develop open standards for mobile devices. Along with the formation of the Open Handset Alliance, the OHA also unveiled their first product, Android, a mobile device platform built on the Linux kernel version 2.6. In July 2005, Google acquired Android Inc., a small startup company based in Palo Alto, California, USA

[Open Handset Alliance]


Android: How it was created

A business alliance consisting of 47 companies

to develop open standards for mobile devices Goal is to Accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience

Members of OHA
Android: How it was created

Mobile Operators Handset Manufacturers

Software Companies

Semiconductor Companies

Commercialization Companies

13

Android is part of the build a better phone process


Open Handset Alliance produces Android Comprises handset manufacturers, software firms, mobile operators, and other manufactures and funding companies
http://www.openhandsetalliance.com/

Android is growing
Uneven distribution of OS by regions

Does not include iTouch or iPad, as not smartphones


http://metrics.admob.com/wp-content/uploads/2010/06/May-2010-AdMob-Mobile-Metrics-Highlights.pdf

Android Software Features


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

Android Hardware Features


Cellular networking : GSM, EDGE, 3G (hardware

dependent)
LAN : Bluetooth, and Wi-Fi (hardware dependent) Graphics Hardware Acceleration Camera, GPS and Compass (hardware dependent)
College Of Engineering Chengannur 18

Touch screen and accelerometer for motion sensing

Android OS Architecture

Architecture
Middleware Libraries (i.e. SQLite, OpenGL, WebKit, etc) Android Runtime (Dalvik Virtual Machine and core libraries) Application Framework Linux Kernel: (Abstraction for hardware access) manages application resources and the UI; provides classes for developing applications for Android Applications Native apps: Contacts, Phone, Browser, etc. Third-party apps: developers applications.

Linux Kernel
Android Architecture

Linux Kernel 2.6 Abstraction layer between the hardware and

software stack Why Linux? Proven driver model and has existing drivers Has memory management, security management, networking, core OS infrastructure, etc. Robust and already has been proven over time
21

Libraries
Android Architecture

Written in C and C++ The core power of the Android platform

22

Libraries
Android Architecture

Responsible for composing different drawing surfaces (ex: diff. windows/applications/process all drawing at the same time) to the screen

Make up the core of the graphics library. OpenGL (3D graphics engine) SGL (2D graphics engine) Can combine 3D and 2D graphics in the same application 23

Libraries
Android Architecture

Provided by PacketVideo OpenCore


Support for: MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG

Bitmap and Vector font rendering

Secure Sockets Layer Protocol for transmitting private documents

24

Libraries
Android Architecture

A powerful lightweight relational database engine

An open source browser engine. Used as the core of the browser which is the same browser powering Safari.

25

Android Runtime
Android Architecture

Main Component: Dalvik Virtual Machine Optimized for running in an embedded environment (limited memory, CPU, battery) Runs .dex files (bytecodes)
.class .jar files

Converted at build time Optimized! More efficient!

26

Android Runtime
Android Architecture

Core Library Contains all the collection classes, utilities, IO, etc.

27

Application Framework
Android Architecture

Toolkit that all applications use (core, by Google, you:)...)

All written using the Java Programming Language


* XMPP: Extensible Messaging and Presence Protocol An open XML technology for real-time communication (instant messaging, shared editing, etc)

28

Application Framework
Android Architecture

Manages the lifecycle of applications and provides a common navigation backstack

Keeps track what applications are installed in device Manages Windows Contains APIs used to build the phone application 29

Application Framework
Android Architecture

Allows applications to share data with other applications (ex: contact info is available to others)

Used to store localized strings, bitmaps, layout file descriptions, etc.

Contains all building blocks of the UI


Provides support for location-based services*
* Support depends on the underlying device

30

Application Framework
Android Architecture

Handles notification of users about events that happen


Examples of notification forms: persistent icon in status bar, vibrating, playing sound, etc.)

Allows applications to communicate between devices through GtalkService. GtalkService maintains a persistent socket connection, therefore the response time is fasterthan SMS.

31

Applications
Android Architecture

Core Applications Email client SMS program Calendar Maps Browser Contacts etc

All applications are written using the Java Programming Language

32

Open
Android is...

Allows access to core mobile device functionality through standard API calls Example Application can call core functionality such as making calls, sending text messages, using camera... Developers can create richer and more cohesive experiences for users Since it's open source, it can be liberally extended as new technologies emerge
33

Advantages of an Open Platform


Android is...Open

Consumers Cheaper mobile devices More innovative mobile devices and services Easier-to-use user interfaces Rich portfolio of applications Mobile Operators Lower overall cost of handsets They will have complete flexibility to customize and differentiate their product lines More rapid innovation in handsets and services
34

Advantages of an Open Platform


Android is...Open

Handset manufacturers Lower software BOM (bill of material) costs Faster time-to-market for handset Greater flexibility to customized and differentiate product offerings Software companies Allow simplified integration of software components into a complete mobile platform More income for them Handset manufacturers will invest in high value and differentiated software components since there are lower acquisition costs in the mobile platform
35

Advantages of an Open Platform


Android is...Open

Semiconductor companies As cellphone-on-a-chip becomes a reality Semiconductor companies will need to access more sophisticated software that take advantage of the enhanced features (3D graphics, signal processor cores, dedicated blocks of multimedia acceleration etc) An open platform will give support to these new peripherals in the platform and will allow semiconductor companies to give 3rd party developers access to these enhanced features in a timely manner
36

Advantages of an Open Platform


Android is...Open

Developers Able to innovate rapidly because they will have comprehensive API access to handset capabilities that are web-ready Increase productivity Comprehensive and easy-to-use developer tools Deeper understanding of the underlying platform will lead them to better optimize their applications Distribution and commercialization of mobile applications will be less expensive and easier

37

All Applications are Equal


In Android...

Android does not differentiate between the phone's basic and third party applications All applications have equal access to the phone's capabilities Example: The dialer and home screen can be replaced

38

Breaking down boundaries


Android is...

Information from the web can be combined with data on the phone Example: Contacts, calendar or geographic location

39

Fast and Easy Development


Android allows...

SDK (Software development kit) includes True device emulator and advanced debugging tools Useful libraries and tools Example Obtain location of the device Allow devices to communicate with one another

40

Android Development
What do you need for Android application development?

Operating System: MS Windows (>= XP), Mac OS X >= 10.4.8, Linux Android SDK (including Android Emulator]
JDK >= 5 Android Development with Eclipse: Eclipse (+ Java Development Tools plug-in and Web Tools Platform) + Android Development Tools plug-in

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: College Of Engineering Chengannur

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 -for the Eclipse IDE - adds powerful extensions to the Eclipse integrated environment (DDMS) 42 Integrated with Dalvik -this tool let us manage processes on an emulator and assists in debugging

2. Android Development Tools Plugin

3. Dalvik

Debug

Monitor

Service

Development Environment

+ ADT plugin

Application Design Considerations


Low processing speed:
Optimize code to run quick and efficiently

Limited storage and memory:

Minimize size of applications; reuse and share data

Limited bandwidth and high latency:

Design your application to be responsive to a slow (sometimes non-existent), intermittent network connection

Limited battery life: Avoid expensive operations


Low resolution, small screen size:
Compress the data you want to display

Application Components and Lifecycle


Components of your Android application: Activities:
Presentation layer for the application you are building For each screen you have, their will be a matching Activity An Activity uses Views to build the user interface

Services:
Components that run in the background Do not interact with the user Can update your data sources and Activities, and trigger specific notifications

Components of your application (contd.): Content Providers


Manage and share application databases

Intents

Specify what intentions you have in terms of a specific action being performed

Broadcast Receivers

Listen for broadcast Intents that match some defined filter criteria Can automatically start your application as a response to an intent

Application Lifecycle
To free up resources, processes are being killed based on their priority:

Critical Priority:

foreground (active) processes; Foreground activities; components that execute an onReceive event handler; services that are executing an onStart, onCreate, or onDestroy event handler.

High Priority:

visible (inactive) processes and started service processes; Partially obscured activity (lost focus); services started.

Low Priority:

background processes: Activities that are not visible; activities with no started service

Activity Lifecycle
Activities are managed as an activity stack (LIFO collection).

Activity has four states:

Running: Activity is in the foreground Paused: Activity has lost focus but it is still visible Stopped:

Activity is not visible (completely obscured by another activity) Activity has not been launched yet or has been killed.

Inactive:

Hello Android
A Peek at an Android App

50

Hello Android
A Peek at an Android App

51

Hello Android
A Peek at an Android App

52

Conclusion
Android is open to all: industry, developers and users Participating in many of the successful open source projects Aims to be as easy to build for as the web.
College Of Engineering Chengannur 53

Google Android is stepping into the next level of Mobile Internet

Contact Me
http://rksingla.puchd.ac.in

rksingla@pu.ac.in

THANK YOU
For your attention

Das könnte Ihnen auch gefallen