Professional Documents
Culture Documents
Android Development Tutorial
Android Development Tutorial
Android Development Tutorial
Contents
Whats Android
Android architecture
Android software development
Hello World on Android
More
Contact Us On : vibranttechnologies.co.in
Android Phones
Sony X10
HTC G1
Samsung i7500
HTC Magic
HTC Hero
Motorola Droid
Samsung Moment
Motorola Cliq
HTC Tattoo
Contact Us On : vibranttechnologies.co.in
Mobile Devices
Its obvious that mobile device may take the place of PC in
future
OS plays a vital part
Processor
Device
Embedded
OS
Middleware
Contact Us On : vibranttechnologies.co.in
Apps
Contact Us On : vibranttechnologies.co.in
Whats Android
Generally, Android is a software stack for
mobile devices that includes an operating
system, middleware and key applications
Android is based on JAVA and all its
applications are developed in JAVA
The JAVA VM, known as Dalvik, is highly
customized and optimized for mobile
devices The core of Android
Android SDK offers rich tools for android
application development and many useful
APIs
Contact Us On : vibranttechnologies.co.in
Android Features #1
Application framework enabling reuse and replacement
of components
Optimized Java virtual machine: Dalvik
Optimized Graphics Processing, supporting 2D and 3D
graphics(OpenGL ES 1.0 )
Integrated open source web browser: WebKit
SQLite for structured data storage
Contact Us On : vibranttechnologies.co.in
Android Features #2
10
Contact Us On : vibranttechnologies.co.in
11
Contact Us On : vibranttechnologies.co.in
Linux Kernel
12
Contact Us On : vibranttechnologies.co.in
Libraries
13
Contact Us On : vibranttechnologies.co.in
Core Libraries
Contact Us On : vibranttechnologies.co.in
Andoid Runtime
Register-based
Executes files in the Dalvik
format
Executable (.dex)
15
Contact Us On : vibranttechnologies.co.in
16
Contact Us On : vibranttechnologies.co.in
Core Libraries
17
Core APIs for Java language provide a powerful, yet simple and
familiar development platform
Contact Us On : vibranttechnologies.co.in
DVM
JVM
Google
Dalvik executable
Only supports a subset of standard Java Library
Sun
Java bytecode
18
Contact Us On : vibranttechnologies.co.in
Application Framework
19
Contact Us On : vibranttechnologies.co.in
Contact Us On : vibranttechnologies.co.in
Applications
21
Contact Us On : vibranttechnologies.co.in
Development Environment
IDE Eclipse
Eclipse plug-in - ADT
Software Development Kit (SDK)
Android Emulator
Debugger
22
Contact Us On : vibranttechnologies.co.in
23
http://androidappdocs.appspot.com/sdk/index.html
E.g.: extract to C:\
The SDK will be used by ADT in eclipse
Contact Us On : vibranttechnologies.co.in
24
Contact Us On : vibranttechnologies.co.in
25
Contact Us On : vibranttechnologies.co.in
26
Contact Us On : vibranttechnologies.co.in
Setup Emulators
27
input a name
choose a running target and a
skin
specify the SD card size
Contact Us On : vibranttechnologies.co.in
Ready
28
Contact Us On : vibranttechnologies.co.in
29
Project name
Build Target
Application name
Package name
Create Activity
Contact Us On : vibranttechnologies.co.in
Contact Us On : vibranttechnologies.co.in
modify HelloWorld.java
31
Contact Us On : vibranttechnologies.co.in
32
Contact Us On : vibranttechnologies.co.in
Behind HelloWorld #1
Behind HelloWorld #2
main.xml
Linear Layout
34
A reference to
String resource
Contact Us On : vibranttechnologies.co.in
hello
Behind HelloWorld #3
referenced in
AndroidManifest.xml
Contact Us On : vibranttechnologies.co.in
Behind HelloWorld #4
folders may have suffixes, app will choose the most suitable
one, so do the other resources
three folders: drawable-ldpi, drawable-hdpi, drawable-mdpi,
each contains an icon.png file
app will choose the proper icon according to the device DPI
reference name:@drawable/icon
36
Contact Us On : vibranttechnologies.co.in
Behind HelloWorld #5
Contact Us On : vibranttechnologies.co.in
Core Components-Activity #1
Contact Us On : vibranttechnologies.co.in
Core Components-Activity #2
39
Activity lifecycle
40
Contact Us On : vibranttechnologies.co.in
Service
Broadcast receivers
Content providers
41
Contact Us On : vibranttechnologies.co.in
Beyond HelloWorld #1
Input: EditText
Display: TextView
Of course, we have to add an button
42
Contact Us On : vibranttechnologies.co.in
Beyond HelloWorld #2
modify HelloWorld.java
43
Contact Us On : vibranttechnologies.co.in
Beyond HelloWorld #3
Finished!
Run->Run as->Android Application
44
Contact Us On : vibranttechnologies.co.in
Thank You
45
Contact Us On : vibranttechnologies.co.in