3. Introduction
What is Android?
• A software platform and operating system for mobile
devices
• Based on the Linux kernel
• Developed by Google and later the Open Handset
Alliance (OHA)
• Allows writing managed code in the Java language
• Android platform was announced on 5th November 2007
with the founding of OHA
4. Android
An Open Handset Alliance Project
What is the Open Handset Alliance (OHA)?
• OHA is an alliance of nearly 50 organizations devoted to
advancing open standards for mobile devices
• Develop technologies that will significantly lower the cost of
developing and distributing mobile devices and services
What’s the Target?
• Write apps to run on mobile phones
• Will be released as open source
http://code.google.com/android
5. Platform
Operating System(s)
• Android uses Linux for its device drivers, memory management,
process management, and networking.
• The next level up contains the Android native libraries. They are
all written in C/C++ internally, but you’ll be calling them through
Java interfaces. In this layer you can find the Surface Manager, 2D
and 3D graphics, Media codecs, the SQL database (SQLite), and
a native web browser engine (WebKit).
Call through Java
Call through Java
Interface
Interface
C/C++
Native Libraries
Surface Manager
Surface Manager
SQLite
SQLite
Media Codecs
Media Codecs
Webkit
Webkit
6. Platform
• Dalvik Virtual Machine. Dalvik runs .dex files,
which are converted at compile time from
layout
layout
.xml
.xml
R.java
R.java standard class and jar files.
*.class
*.class *dex.
*dex.
• The Dalvik runtime is highly optimized:
*.java
*.java Run multiple VMs efficiently
Each app has its own VM
Minimal memory footprint
android-
android-
manifest.xml
manifest.xml
application.
apk file • Android applications are compiled to Dalvik
bytecode.
7. Software Development
IDE and Tools
Android SDK
• Class Library
• Developer Tools
dx – Dalvik Cross-Assembler
aapt – Android Asset Packaging Tool
adb – Android Debug Bridge
ddms – Dalvik Debug Monitor Service
• Emulator and System Images
• Documentation and Sample Code
Eclipse IDE + ADT (Android Development Tools)
• Reduces Development and Testing Time
• Makes User Interface-Creation easier
• Makes Application Description Easier
9. Android APIs
Android-specific packages are easy to identify because they start with android in
the package name. Some of the more important packages are:
android.app—Android application model access
android.bluetooth—Android’s Bluetooth functionality
android.content—Accessing and publishing data in Android
android.net—Contains the Uri class, used for accessing content
android.gesture—Create, recognize, load, and save gestures
android.graphics—Graphics primitives
android.location—Location-based services (such as GPS)
android.opengl—OpenGL classes
android.os—System-level access to the Android environment
android.provider—ContentProvider-related classes
android.telephony—Telephony capability access, including support for both Code Division Multiple
Access (CDMA) and Global System for Mobile communication (GSM) devices
android.text—Text layout
android.util—Collection of utilities for logging and text manipulation, including XML
android.view—UI elements
android.webkit—Browser functionality
android.widget—More UI elements
10. Android APIs
Java packages included in the Android SDK:
java.lang—Core Java language classes
java.io—Input/output capabilities
java.net—Network connections
java.text—Text-handling utilities
java.math—Math and number-manipulation classes
javax.net—Network classes
javax.security—Security-related classes
javax.xml—DOM-based XML classes
org.apache.*—HTTP-related classes
org.xml—SAX-based XML classes
12. Android Building Blocks
Activity:
It represents a visible Services
application component
within Android
Intents:
An Intent in Android Notification
describes what you want
to do.
Content Provider: Views:
It helps data sharing between UI elements
different Android Applications
or between different Activities.