Android unveiled (I)

19
Android Unveiled (I) Daniel Romero [email protected]

description

 

Transcript of Android unveiled (I)

Page 1: Android unveiled (I)

Android Unveiled(I)

Daniel [email protected]

Page 2: Android unveiled (I)

BackgroundPast: 

Mobile phones were just that, phonesIncreasingly including new hardware

Not-so-distant pastProgrammers had to know the specific hardware (C,C++)Some abstractions: Symbian, Java...

Present & FutureOperating systems designed for mobile hardware

Propietary: Windows, Apple, PalmOpen Source: Android, Maemo

Page 3: Android unveiled (I)

What is Android?

Open platform for mobile developmentA combination of three components

Free & open-source OS for mobile devicesOpen-source development platform for mobile applicationsDevices that run the OS & apps

Page 4: Android unveiled (I)

Some Features 

No fees (licensing, distribution, development)No approval processFull hardware accessBackground apps and processesSQLite or Data StorageNative Google Maps, Geocoding and Location-Based servicesShared data and interapplication communicationWidgetsSupport for 2D and 3D graphicsOptimized memory & process managementSupport for large variety of hardware

Page 5: Android unveiled (I)

Some Statistics

Year 2008 2009 2010

Devices 1 (G1) 18 40 (confirmed)

Manufacturers 1 (HTC) 8 14

Page 6: Android unveiled (I)

Why develop for mobile? 

New multifunction devicesNumber of phones > Number computersFlatrates - Affordable data plansPhone user installs more apps

Page 7: Android unveiled (I)

Why Android?

Based on the reality of modern devices Simple & powerful SDKNo certification - No approval processUnique features:

Google Maps integrationBackground services & applications -> MultitaskingShared data & interprocess communicationEquality between appsTotal access to phone resources 

Page 8: Android unveiled (I)

The Development Framework (I) 

Java programming languageDalvik VMArchitecture

Each app runs a separated VMAndroid runtime manages resourcesBoth sit on top of a Linux kernel -> Low-level hardware interactionAPI provides access to: services, features and hardware

SDKAndroid APIsDevelopment toolsVirtual Device Manager and EmulatorDocumentation + Sample Code + Online Support

Page 9: Android unveiled (I)

The Development Framework (II) 

Android Software StackLinux 2.6 KernelC/C++ Libraries: libc, SSL, media, graphics, SQLite, Webkit...Android Runtime

Core LibrariesDalvik virtual machineApplication FrameworkApplication Layer

Page 10: Android unveiled (I)

Android Architecture

Page 11: Android unveiled (I)

Dalvik Virtual Machine (I) 

Designed by to run efficiently multiple instances on a single deviceNot strictly a JVM: runs its own bytecodeOptimized for low memory requirements Features:

Dalvik bytecodeRegistered-based architecture From Android 2.2 -> Just-in-time compiler

OptimizationsVM was slimmed down to use less spaceConstant pool uses only 32-bit indexes to simplify the interpreterOwn bytecode

Apache Harmony open source class library implementation

Page 12: Android unveiled (I)

Dalvik Virtual Machine (II) 

CompilationDx tool converts .java classes into .dex formatOne .dex files contains several .java classes.dex file is optimized to use less space.dex file < .jar file for the same group of classesJava bytecode converted into specific instruction set used by Dalvik VM Executables modified during installation process

Byte order may be changedFunction libraries and data structures may be inlined

Page 13: Android unveiled (I)

Application Architecture 

Main services: Activity Manager: controls the life cycle of the ActivitiesViews: Used to construct the user interfacesNotification Manager: mechanism to signal the usersContent Providers: Share data between appsResource Manager: Support for non-code resources

Page 14: Android unveiled (I)

Main Releases (I)Android 1.5 -April 2009

Performance:Camera start-up and image captureAdquisition of GPS locationPage scrolling and Gmail list scrolling

On-screen soft keyboard Widgets & Live foldersVideo recording & playbackImproved bluetooth, browser and contacts appSystem

New Linux Kernel (2.6.27)SD card filesystem auto-checking and repairSIM Application Toolkit 1.0

Page 15: Android unveiled (I)

Main Releases (II)Android 1.6 - September 2009

 New featuresQuick search boxCamera, camcorder and galleryVPN, 802.1x supportBattery usage indicatorAccessibility frameworkAndroid Market updates

New technologiesSearch frameworkText-to-speech engineGesturesExpanded support for screen densities and resolutionsMore: CDMA, OpenCore, Linux Kernel upgrade... 

Page 16: Android unveiled (I)

Main Releases (III)Android 2.0 - January 2010

 New featuresMultiple contacts and accountsCombined email and Exchange supportImproved messagingCamera: flash, digital zoom, scene mode...Improved virtual keyboardImproved browserImproved calendar

New technologiesBluetooth 2.1New framework API 2.0

Page 17: Android unveiled (I)

Main Releases (IV)Android 2.2 - May 2010

New featuresMultiple home screen configurationsPortable WIFI hotspotMultiple keyboard languages (at the same time)Performance

V8 engine: faster JavascriptDalvik Performance Boost: 2x-5x speedup over 2.1 with Dalvik JITKernel Memory Management Boost: improved memory reclaim by 20x

New technologiesNew media framework: StagefrightKernel upgrade 2.6.32

New Developer APIs

Page 18: Android unveiled (I)

Developing Android Apps 

  

"Android Unveiled (II)" coming soon to theatres...

Page 19: Android unveiled (I)

Sources 

Professional Android 2 Application Development - Reto Meier - 2010http://developer.android.com/sdk/http://www.android.com/ http://www.androphones.comhttp://www.dalvikvm.com/http://sites.google.com/site/io/dalvik-vm-internals http://en.wikipedia.org/wiki/Dalvik_%28software%29