Beruflich Dokumente
Kultur Dokumente
Contents
Whats
Android
Android
architecture
Android
software development
Hello
World on Android
More
Whats Android
Android Phones
Mobile Devices
Its
OS
OHAs
aim
accelerate
offer
OHA
OHA
Whats Android
Generally,
Android
The
Android
Android Features #1
Application
Optimized
Optimized
Integrated
SQLite
Android Features #2
Multimedia
GSM
Telephony
Bluetooth,
Camera,
Hardwar
e
depende
nt
10
Android architecture
11
12
Linux Kernel
Note
Supplies
Acts
13
Libraries
Run
in system background
Using
4
C/C++ Language
types of Libraries
Bionic
Function
Native
Servers
Hardware
Abstraction Libraries
14
Core Libraries
System
Media
Surface
WebKit,
Andoid Runtime
The
Dalvik
Virtual Machine
Register-based
Executes
x) format
Java
Executable (.de
core Libraries
Provides
16
Multiple
Every
17
Provides
Runs
Java
Designed
Supports
Highly
Efficiently
Core
Libraries
Core
18
executable
JVM
Sun
Java
Some
bytecode
19
Application Framework
Simplify
Applications
Applications
Views
20
Notification
Resource
Content
Views,
Applications
A
All
written in Java
Our
22
23
Development Environment
IDE
Eclipse
Eclipse
plug-in - ADT
Software
Android
Emulator
Debugger
extract to C:\
The
25
Eclipse
Update
site:
https://dl-ssl.google.com/
android/eclipse/
Install
Restart
llation
26
27
Click
28
Setup Emulators
After
Click
alog
input
a name
specify
29
Ready
Now
start to start t
he new AVD
First
start-up may t
ake a very long tim
e
30
31
File->New->An
droid project
Project
Build
name
Target
Application
Package
Create
32
name
name
Activity
source folder
gen:
android
assets:
binary resources
res:
AndroidManifest.xml:
default.properties:
properties
33
file
appli
project
34
HelloWorld.java
Select
ADT
on it
35
Behind HelloWorld #1
R.java,
*
This class was automatically generated by the
** aapt
tool from the resource data it found. It
* should not be modified by hand.
*/
package sample.hello;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int icon=0x7f020000;
}
public static final class layout {
public static final int main=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f040001;
public static final int hello=0x7f040000;
}
36}
Behind HelloWorld #2
res/layout
main.xml
Layout
37
A reference
to String
resource
hello
Behind HelloWorld #3
res/values,
referenced in
AndroidManifest
.xml
Behind HelloWorld #4
res/drawable,
folders
three
app
DPI
reference
other
menu,
39
e)
name:@drawable/icon
Behind HelloWorld #5
AndroidManifest.xml
declare
declare
40
Core Components-Activity #1
An activity presents a visual user interfa
ce for one focused endeavor the user can undertak
e
Basically,
An
Each
The
Core Components-Activity #2
Activities
The
on
The
42
Activity lifecycl
e
43
Broadcast
receivers
Content
providers
The
44
Beyond HelloWorld #1
Build
EditText
Display:
Of
Edit
nts
each
ode
45
TextView
Beyond HelloWorld #2
modify
firstly
then
46
HelloWorld.java
get the references declared in main.xml
Beyond HelloWorld #3
Finished!
Run->Run
47
Quite
as->Android Application