EPITA - Android introduction - Benoit Verdier - 3IE

quaintmayoMobile - Wireless

Dec 10, 2013 (3 years and 8 months ago)

150 views

EPITA - Android introduction - Benoit Verdier
Android introduction
1
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
History
2
Year
SDK
Devices
released
2008
1,0
not a lot
2009
1.5, 1.6, 2.0, 2.1
 20
2010
2,2
 60
2011
2.3, 3.0, 3.1, 3.2
2012
4.0, 4.1
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Background infos

Open source platform: access to the entire
platform source code

Apache/MIT license: business friendly
use it, modify it, distribute it
3
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
SDK Distribution
4
25%
Jellybean
29%
4.0 ICS
3.x Honeycomb
0%
2.3 Gingerbread
40%
SDK 1.x - 2.2
6%
Data collected during a 14-day period ending on April 2, 2013
SDK 1.x - 2.2
2.3 Gingerbread
3.x Honeycomb
4.0 ICS
Jellybean
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Applications

APK

Dalvik executable

Resources

Native libraries

App signing

Run in sandbox
5
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Java

Android phones run dalvik byte code

Applications in java

Java Standard Edition with original UI
libraries replaced
6
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
User interface

Declarative User Interface

XML

WYSIWYG

Programmatic User Interface
7
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Android
stack
8
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Project composition
9
Composition of a regular HelloWorld project
Manifest
AndroidManifest.xml
Layout XML
res/layout/main.xml
Strings
res/values/strings.xml
R file
gen/fr/epita/R.java
Source code
src/fr.epita/
HelloWorldActivity.java
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Project composition

Manifest
: the activity list, the settings and
the permissions it requires

Layout XML
: interface to display

Strings
: the text that your app uses

R file
: the bridge between the resources
and the Java code; auto-generated file

Source code
: the application logic
10
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Activities

Main building blocks

Any app that displays something has at least
an activity

Bound at runtime

Independent lifecycle
11
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Services

perform long running operations

no user interface

lifecycle independent of the program that
launched it
12
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Content providers

Store and retrieve data

Only way to share data across applications

Default Providers to access common data
on the Android device
13
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Intents

Messages sent among blocks and across
applications

Contain a description of an operation to be
performed

Activated at runtime

Can start applications and services
14
lundi 22 avril 13
EPITA - Android introduction - Benoit Verdier
Dev guide
15
http://developer.android.com/guide/index.html
lundi 22 avril 13