Android Platform

knapsackyarnMobile - sans fil

14 déc. 2013 (il y a 3 années et 9 mois)

143 vue(s)

Android Platform
2009.10
NemusTech






欄ﰫ
(

)
裂
:
߄社
/
祖߬٣
啕
:
ﳒﲬ
/

隸
:
﮶ﱴ
/
٣練碑
Android, Linux, iPhone
Quick Tiffany 3D Modeling
Quick remodeling with single line modification
panels on linear rail modeling (20 source line)
vertical axis
Cube
Circular rail
Agenda

Google Android

Introduction

History

Current Status

Architecture

Developing Android

Building Application

Android Roadmap

Future of Android

Summary
Google Android
Current Mobile
Platform

4PGUXBSF 4UBDL
m
,FSOFM

UIF DPSF PG UIF 48 )8 ESJWFST NFNPSZ
GJMFTZTUFN BOE QSPDFTT NBOBHFNFOU

m
.JEEMFXBSF

5IF TFU PG QFSJQIFSBM TPGUXBSF MJCSBSJFT
NFTTBHJOH BOE DPNNVOJDBUJPO FOHJOFT
8"1 SFOEFST DPEFDT FUD

m
"QQMJDBUJPO &YFDVUJPO &OWJSPONFOU

"O BQQMJDBUJPO NBOBHFS BOE TFU "1*T
m
6* GSBNFXPSL

" TFU PG HSBQIJD DPNQPOFOUT BOE BO
JOUFSBDUJPO GSBNFXPSL
m
"QQMJDBUJPO 4VJUF

5IF TFU PG DPSF IBOETFU BQQMJDBUJPO *%-&
TDSFFO EJBMFS NFOV TDSFFO DPOUBDUT
DBMFOEBS FUD


Microsoft Windows Mobile
-
Will release WM7 in 2010

Nokia S60 Platform
-
Lenovo,LGE,Panasonic,Samsung
-
Symbian OS 9.x (Java MIDP, C, Python)

RIM’s BlackBerry
-
Push E-Mail Service
-
MS Exchange, Lotus Domino/Notes, Novell GroupWise

Apple’s iPhone
-
Advanced UI , Robust Mac OS

Palm Pre
-
WebOS (WebKit Based)
Major Platforms
Linux Platforms

LiMo Foundation

https://www.limofoundation.org/sf/sfmain/do/home

TrollTech

Qtopia GreenPhone

Acquired by Nokia

OpenMoko : GNU/Linux based software development platform

http://www.openmoko.org
,
http://www.openmoko.com


Linux Kernel, GUI using X. Org Server, GTK,Matchbox window manager

First Supported phone, Neo1973 (also support Qtopia)

ALP  (Access Linux Platform)

http://alp.access-company.com/

Nokia N810 – Maemo

http://maemo.org/

MontaVista - Mobilinux

Palm Pre - WebOS (WebKit Based)

Google - OHA,  Android OS

http://www.openhandsetalliance.com/

Android : A complete set of SW for mobile devices

Operation System, Middleware, and Key mobile applications
Linux Platforms

#FOFGJUT
m
-JOVY JT EFTJHOFE UP BWPJE TJOHMFWFOEPS EPNJOBUJPO
m
5IF -JOVY LFSOFM IBT CFFO QPSUFE UP NPSF UIBO B EP[FO DIJQTFUT
m
-JOVY JT DIFBQ BOE PQFO UP JOOPWBUJPO
m
5FDIOJDBMMZ DPNQFUFOU BOE DPTUFGGFDUJWF GPS DPOWFSHFE EFWJDFT
m
4FWFSBM HPWFSONFOUT NPTU OPUBCMZ $IJOB
TVQQPSU -JOVY

$IBMMFOHFT
m
5IF -JOVY LFSOFM JT PQUJNJ[FE GPS EFTLUPQ BOE FNCFEEFE
m
%JTUSJCVUJPO MBDL UIF GFBUVSF TFU SFRVFTUFE CZ OFUXPSL PQFSBUPST FYDFQU 7PEBGPOF

m
/P DPOTFOTVT PO -JOVY

T "1*T
m
.JUJHBUJOH MFHBM DIBMMFOHFT
Smart Phone Market Share
Source: Gartner Press Releases
2009 1Q Market
2009 1Q Market
2009 2Q Market
2009 2Q Market
Sales (1K)
Share (%)
Sales (1K)
Share (%)
Symbian
17,937.2
49.3
20,880.8
51
RIM
7,233.6
19.9
7,678.9
18.7
iPhone OS
3,938.7
10.8
5,437.7
13.3
Windows Mobile
3,733.4
10.3
3,814.3
9.3
Linux
2,540.5
7.0
1,907.1
4.6
Android
575.3
1.6
755.9
1.8
SmartPhone WebOS
0
0
205.0
0.5
Palm OS
273.2
0.8
152.8
0.4
Others
172.7
0.8
139.3
0.3
Total
36,404.6
100
40,962.8
100
Android is……

a software stack





for mobile devices

that includes an

operating system,


middleware

and key applications.


....

d e v e l o p i n g a p p l i c a t i o n s ...



u s i n g t h e
+ B W B
p r o g r a m m i n g l a n g u a g e.
W h a t i s A n d r o i d?

History

2001 search service for wireless device

2005

Acquire Android (Andy Rubin : Danger CEO, Development Sidekick of T-
Mobile)

Acquire Skia (2D Graphics for mobile device)

Acquire RegWireless (Browser and Email for mobile device)

Move Engineers from PalmSource (Dianne Hackborn, etc…)

2007.11 Android SDK Release, OHA

2008. 2 Android Developer Challenge

2008. 11 Android Phone (G1 Phone by HTC/T-mobile)

2008. 11 Full Source Open

2009. 4 HTC Magic

2009. 7 HTC Hero, Samsung i7500, Android Netbook, Set-top......

2009. 8 Android Developer Challenge 2
History of Android
Open Handset Alliance
Mobile Operators
Semiconductor Companies
Handset Manufacturers
Software Companies
Commercialized Companies
Androids......
п

嬨晴

隸練

߹

令ﳠ

黎爫

ױ

ѐߊ

律奔

ߊﲴ
Android Devices...
Acer Liquid – A1 –
November 28th
1.
Compulab Exeda
2.
Dell Ophone mini3i – Benzine
3.
Geek Phone One
4.
General Mobile DSTL1
5.
Haier H7
6.
HKC Pearl
7.
HighScreen PP5420
8.
HTC Click – Fiesta – Tattoo
9.
HTC Desire 6200 –
November
10.
HTC Dragon – Zoom 2
11.
HTC Dream – T-Mobile G1
12.
HTC Hero – G2 Touch
13.
HTC Lancaster
14.
HTC Magic – Sapphire – T-Mobile myTouch
3G – Google Ion – Dopod A6188
15.
HTC Passion
16.
HTC Predator
17.
Huawei U8220 – T-Mobile Pulse
18.
Huawei U8230
19.
Innocomm Skate
20.
Kogan Agora
21.
Koolu Freerunner – Openmoko GTA02
22.
Lenovo O1 Ophone
23.
LG Etna
24.
LG GW620 Eve –
November 2009
26.
LG GW880
27.
Motorola Calgary
28.
Motorola Devour
29.
Motorola Droid – Sholes – Tao –
November 7th
30.
Motorola Heron
31.
Motorola MB200
32.
Motorola MB300
33.
Motorola Morrison – Cliq – DEXT
34.
Motorola Motis –
2010
35.
Motorola Sholes Tablet –
2010
36.
Motorola Zeppelin –
2010
37.
Philips V808
38.
Qigi i6
39.
Samsung Behold 2 T939 –
November 18th
40.
Samsung Bigfoot
41.
Samsung Galaxy i7500
42.
Samsung Galaxy Lite i5700 – Spica –
2010
43.
Samsung Houdini
44.
Samsung m850 Q
45.
Samsung Moment – InstinctQ m900 –
November
1st
46.
Sciphone N12
47.
Sony Ericsson XPERIA X3 / x10 Rachael –
January 2010
48.
Sunno S880
49.
Tiger G3
50.
ZTE Android
First Google Android Phone Anniversary
Source from
http://www.googleandblog.com
T-Mobile G1/HTC
HTC Hero Sense UI

Upgraded framework
Motorola - Cliq

MOTOBLUR UI

Home Screen

Social Networks

Contacts

Messaging

Calendar
Android Architecture
Linux Kernel

Linux version 2.6 for core system services

Security, Memory Management, Process
Management, network stack, driver model

Kernel : Abstraction Layer between the
HW and the rest of the SW stack

Android uses only “Kernel” portion in
Linux
Android Runtime

Core Libraries

Provides the functionality of the Java Programming Language

Android Application runs in its own process, with its own instance of the Dalvik virtual machine

Dalvik VM : Java based license free VM

Register based VM, optimization for low memory requirements

Executes files in the Dalvik Executable (.dex) format

DX tool converts classes to .dex format

Why Dalvik, Why Java?

Separate HW layer/ SW layer

Kernel is responsible for Security

Allow Multiple VM instance

To insure compatibility

Support different HWs (LCD, Keypad, …etc)

Avoid License Issues
Architecture in detail

The Design goal of Android – Openness

Be as flexible as possible

How it handles access to data (Mashups on the internet and everything
else)

Rapid development (XML, Java)

Dev Language?

App
: Java

Framework
: Java

Libraries
: C/C

OS & Driver
: C

Creating Native C Applications

Possible, but......

WebKit based (Safari like, same with iPhone and Nokia Series 60)

Highly optimized for mobile environment by Google

No flash support yet, but Hero supports Flash

Support package and interfaces for SDK

Opera mini passed ACID3 test in Android
Android’s Browser
Developing Android
Android SDK

Tools

Emulator : QEMU  libSDL

Provide emulator console, telephony emulation, skins

DDMS (Dalvik Debug Monitor Service)

Thread/Heap/Process/Log Monitor

File Explorer

ADB Shell

Logcat, Android Log, Traceview

Samples/Docs

System and Software Requirements

Supported Operating Systems

Windows XP/Vista

Mac OS X 10.4.8 or later (x86 only)

Linux(tested on Linux Ubuntu Dapper Drake)

Supported Development Environments

Eclipse IDE

Eclipse 3.2,3.3 (Europa)

Eclipse JDT Plugin

JDK 5 or JDK 6

ADT (Android Development Tools plugin), optional

Other IDEs

JDK 5 or JDK 6

Apache Ant

GCJ(Gnu compiler for Java) not compatible

Sources

Eclipse

Using ADT (Android Development Tools) Plugin

Generate Android Template

Packages

src

res

assets

AndroidManifest.xml

Structured XML file, always named
AndroidManifest.xml

Declare the application’s components

Identifying permissions
<?
xml
version=
"1.0"
encoding=
"utf-8"
?>
<
manifest

xmlns:android
="http://schemas.android.com/apk/res/android"

package
="com.nemustech.todolist"
android:versionCode=
"1"
android:versionName=
"1.0.0"
>

<
application

android:icon
="@drawable/icon"
android:label
="@string/app_name"
>

<
activity
android:name=
".ToDoList"

android:label
=
"@string/app_name"
>

<
intent-filter
>

<
action

android:name
="android.intent.action.MAIN"
/>

<
category

android:name
="android.intent.category.LAUNCHER"
/>

</
intent-filter
>

</
activity
>

</
application
>
</
manifest
>

Android Manifest
Building Android Application

Hello Android

Adding TextView

Using XML based coding

Res.layout.main.xml

Simple Web View

uses-permission - Internet

Using WebKit class

wv  new WebView(this); wv.loadUrl("
http://www.naver.com
");

Simple Map View - Need API Key

keytool -list -alias androiddebugkey -keystore /.android/debug.keystore -storepass
android -keypass android

http://code.google.com/intl/ko-KR/android/maps-api-signup.html

Using MapActivity
mv  new MapView(this);
setContentView(mv);

Using XML
view class"com.google.android.maps.MapView"
Sample - API Demos

ApiDemos comes with the Android SDK - Ultimate Reference!

Each subdirectory have a high-level functional area of the Android API

APP

Examples of application-level constructs such as Activities, Alarms, Dialogs, and Services.

Content

Describes how to read assets from a file, from resources, and from an XML file.

Graphics

Many types of graphics examples, such as arcs bitmap manipulation, clipping, layers, and
OpenGL.

Media

MediaPlayer, VideoView

OS

Examples of how to invoke operating system services

Text

Cool text tricks

Views

All of the various Android views
ADB (Android Debug
Bridge)

Command-line debugging application included with the
SDK. It provides tools to browse the device, copy tools
on the device, and forward ports for debugging.

Eclipse Integration

ADB PUSH

ADB PULL

ADB INSTALL

ADB UNINSTALL

ADB SHELL
DDMS

Dalvik Debug Monitor Service

GUI debugging application included with
the SDK.

Provides screen capture, log dump, and
process examination capabilities.

If you are developing in Eclipse using the
ADT Plugin, DDMS is integrated into your
development environment
References

http://developer.android.com/index.html

Dev Guide, Blog, Groups

Android Application Development, 1st
Edition, By Rick Rogers, John Lombardo,
O’reilly Media, Inc.

Professional Android Application
Development, by Reto Meier, Wrox

Managed Code

Ajax

Native Code

Reference

Google IO 2009

How Do I Code Thee?

by
Dan Morrill
, Google Developer Relations
Three Delicious Flavors

Dalvik is a virtual machine, similar to the JVM
or .NET CLR

Memory-protected, garbage-collected, and
lifecycle-managed

Optimized for embedded machines

Build to reduce much of the need for a JITC

Custom bytecode format; included translator
from Java bytecode
Dalvik - Overview

Apps run on Dalvik , which provides core framework APIs

APIs are backed by system infrastructure in native code

e.g. OpenGL, Binder IPC, Media, etc

Popular tools are supported, and an Eclipse plugin is avaliable
Writing Dalvik Apps

What Can You Do

Rich UIs

Background Services

Shared Components

Tight integration with system events and UI

What Can’t You Do

Dalvik is the primary app platform - the crossroads

Some apps need raw speed

Some apps don’t need tight integration
Dalvik Apps
Dalvik - Future

Improved (faster, better) garbage collection

Just-In-Time Compilation

Optimizations in core libraries

Additional APIs -- Bluetooth, P2P, and more
Ajax(Web) - Overview

Apps are broken up into convenient
declarative layouts & code

JavaScript code mutates the DOM to create
UI effects

Network access is available via
XMLHttpRequest

Recently, canvas allows JavaScript to do
direct painting
Ajax on Android

Android’s Browser is based on WebKit 
SquirrelFish

WebKit v528.5, equivalent to Safari 4 beta

Reports as 3.1.2 in the user-agent string

Includes Gears 0.5.17.0 (including location)

Includes support for the canvas tag
Ajax Apps

Of course, just build static web page apps

What can you do

Build dynamic UIs, via DOM or canvas

You can fetch & store data on your origin server

With HTML5, you can also:

Access location

Run code outside the main thread

Store data & pages locally

What can’t you do

Background processing

Access system & framework APIs
Ajax - Future

HTML5 will keep getting better

Android will continue to include a world-
class browser

Gears today, HTML5 in the future

Plans to upgrade to an even faster JSVM
Ajax - What else can
you do

Augmented Ajax

Inject functionality into JavaScript
Native - Overview

Launched as a Dalvik Application

Loads a dynamic library (.so, ARM ELF, linked
against Bionic)

Makes calls into native code via JNI for heavy
lifting

.so files are created using the NDK
complement to the SDK

Work-in-progress NDK added to donut branch
Native Apps

What can you do

Physics simulations

Efficient/Fast loading of large-ish data files

Speed-intensive lookups, such as for IMEs

Custom VMs

Unsupported things...

Technically, other libraries are present, but have no guarantees

Use them, and you deserve the Market user ratings you will get when your
app breaks

What can’t you do

Current set of APIs is limited to libm and libc

More will be added over time

hx0r the system -- sandboxing still applies
Android NDK

Allows developers to implement parts of applications using native-code
languages such as C and C

The NDK provides

A set of tools and build files used to generate native code libraries from C
and C sources

A way to embed the corresponding native libraries into application package
files (.apks) that can be deployed on Android devices

A set of native system headers and libraries that will be supported in all
future versions of the Android platform, starting from Cupcake. : libc, libm,
JNI interface headers, libz, liblog, A minimal set of headers for C support

Docs, Samples, Tutorials

Good candidates for NDK : Self-contained, CPU-intensive operations such as
signal processing, intensive physics simulations, data processing...
Native - Future

Add additional libraries,... TBD

No plans to make native code a fully-
independent app model

...but there’s no reason to prevent
developers from doing stuff
Demo

K-Means clustering

Used to identify clusters in sets of points

Simple 2D Version

Easy to visualize on screen

Source and App Available at :

http://code.google.com/p/hdict

http://hdict-io09.appspot.com/index.html
Benchmarks

Dalvik is very competitive with other pure-interpreted VMs

Dalvik, as a front-end for native code, usually beats JavaScript

...But clearly, there are use cases where that doesn’t matter

And of course, custom native code will always win the speed test
Android Roadmap

Cupcake Version : Android 1.5

Input method framework / Input method engines

Application Upgraded

Email/MMS/Alarm/Music/Browser,......

Linux Kernel Upgraded

Basic x86 Support

SDK Improvements

Donut Version : Android 1.6

Support for additional types of displays

AGPS (Using SUPL support)

Gesture, Universal Search, TTS, CDMA Support

Eclair Version : Android 2.0 (Flan?)

Google Chrome (fixed)

Google Maps, Google Earth, New Android Market

3D enhancement, Multi-Touch

Flash 10

SNS Integration
Future of Android

Business model

Organize the world’s information and make it universally
accessible and relevant

No direct-advertising component in the platform

Search and Advertisement (NetworkDesktop


MobilePhone)

Will NOT make A gPhone

Google 700Mhz bid - FAILED but...

Open Market Store (like AppStore)

A broad developer community

License Issues?

Open Source
﨤缾

ҳ
!

ASL (Apache Software License)

Linux Kernel is licensed under (GPLv2)
Developer Challenge

$10 million in awards

Challenge I : Emulator Version ( Jan 2. 2008)

Challenge II : Handset Version (Announced Recently, Oct. 2009)

Opened Project

Social Network (with 2d&3d animation)

FPS : Wi-Fi Army

Location Search : with google map

Drive By Ad. : Location base Ad.

Car Navigation

Mobile Shopping

Ebook with full text index : google phone search?

Location Base!

Almost Location Base Service except ebook, Social Network (over 80%)

Small group is discussing game/PDA apps
!"#$%&'((
)$'*+%,-(.+/0-$($#$%&(.,%,1$'(
,%2(3'0$%2*405(6%2$'(
"
!
(!,*7(.$84,%0*.(&+(,'',%1$(
.$$9%1*(:0&4(7+;'(3'0$%2*<(
+'1,%0=$(&4$.(,%2(,88$5&(
0%#0&,9+%*(>(5,'&7<(*5+'&*(+'(
8+%8$'&*(
?,@$(7+;'($#$%&(.,%,1$'(:0&4(7+;
(
Developer
: Michael Zitzelsberger

!"#$%&'((
)$'*+%,-(.+/0-$($#$%&(.,%,1$'(
,%2(3'0$%2*405(6%2$'(
"
!
(!,*7(.$84,%0*.(&+(,'',%1$(
.$$9%1*(:0&4(7+;'(3'0$%2*<(
+'1,%0=$(&4$.(,%2(,88$5&(
0%#0&,9+%*(>(5,'&7<(*5+'&*(+'(
8+%8$'&*(
?,@$(7+;'($#$%&(.,%,1$'(:0&4(7+;
(
Developer
: Michael Zitzelsberger

ADC Winners

Mash-up

New service with existing information

Not supported directly yet

Source

Google :
www.google.com

ride finder

maps : street view

search by location

video & youtube

mash-up editor

google talk

GoogleMobile :
www.google.com/m

gmail

calendar

notebook

docs

reader

picasaweb

3rd Party?
Android
H/W Support
GPS Location
Compass Direction Sensor
Accelerometer
Camera(Still/Video)
Network Support
GPRS
700MHz W-MAN
Wi-Fi
Intent
Access Service via URL
XMPP
Google Instant Message
Mash Up
Mash Up Example
Summary
- Android?

Benefits

Open Platform / License Free

Robust OS Kernel, Innovative Library Packages

Easy App. Development

Rapid Improvement

Challenges

Performance Consideration

Hard to Integrate for Vendors

Too Much Google Dependent

Key Factor : The Market Response
zaharangnemustech.com