Overview of Android Platform
Overview of Android Platform
Computing
2014
1
What is Android?
• A software stack for mobile devices that includes
– An operating system
– Middleware
– Key Applications
• Uses Linux to provide core system services
– Security
– Memory management
– Process management
– Power management
– Hardware drivers
What is Android?
3
Phones
HTC G1,
Droid, Motorola Droid (X)
Tattoo
4
Tablets
5
MarketShare
6
Architecture
http://developer.android.com/guide/basics/what-is-android.html
7
Android S/W Stack - Application
8
Android S/W Stack – App Framework
9
Android S/W Stack –
App Framework (Cont)
Feature Role
10
Location Manager
Notification Manager
Notification Manager
• How background app interact with users
21
Short History cont.
• 2012
– Android 4.1, "Jelly
Bean" released in
July
• 2013
– Android 4.4, KitKat
released October
31, 2013
Device Distribution Jan 2012
• Business Strategy:
attract developers with
comparison of revenue
generated by
applications, average
revenue per user, etc.
Apple Still Dominating Revenue
• http://blog.appannie.com/app-annie-index-market-q2-2013/
Search Trends fall 2012
http://www.google.com/trends
Search Trends fall 2013
World wide
Search trends early 2014
Setup Development Environment
• Install JDK 7
• Install Eclipse IDE (version 4.3 - Kepler)
– recommended "Eclipse Standard"
• Download and unpack the Android SDK
• Install Android Development Tools (ADT) plugin
for Eclipse
• Detailed install instructions available on Android
site
http://developer.android.com/sdk/installing.html
AVD Manager
SDK Manager
Android Emulator or AVD
• Emulator is essential to testing app but is not a
substitute for a real device
• Emulators are called Android Virtual Devices
(AVDs)
• Android SDK and AVD Manager allows you to
create AVDs that target any Android API level
• AVD have configurable resolutions, RAM, SD
cards, skins, and other hardware
Android Emulator: 1.6
Android Emulator: 2.2
Android Emulator: 3.0
Android Emulator: 4.0
Emulator Basics
• Host computer’s keyboard works
• Host’s mouse acts as finger
• Uses host’s Internet connection
• Other buttons work: Home, Menu, Back, Search,
volume up and down, etc.
• Ctrl-F11 toggle landscape portrait
• Alt-Enter toggle full-screen mode
• More info at
http://developer.android.com/guide/developing/devices/emulator.html
Emulator Limitations
• No support for placing or receiving actual phone calls
– Simulate phone calls (placed and received) through the emulator
console
• No support for USB connections
• No support for camera/video capture (input)
• No support for device-attached headphones
• No support for determining connected state
• No support for determining battery charge level and AC
charging state
• No support for determining SD card insert/eject
• No support for Bluetooth
• No support for simulating the accelerometer
– Usewhy
That's OpenIntents’s
we needSensor Simulator
the dev phones and tablets!
Create an AVD using
AVD Manager
Launch device
More info:
http://developer.android.com/guide/developing/devices/managing-avds-cmdline.html
46
Applications Are Boxed
• By default, each app is run in its own Linux
process
– Process started when app’s code needs to be
executed
– Threads can be started to handle time-consuming
operations
• Each process has its own Dalvik VM
• By default, each app is assigned unique Linux ID
– Permissions are set so app’s files are only visible to
that app
Producing an Android App
javac
Java code Byte code
dx
.java .class Dalvik exe
classes.dex aapt
<str>
Resources
Other Dev Tools
• Android Debug Bridge
• Part of SDK
• command line tool to communicate with an
emulator or connected Android device
– check devices attached / running
– install apk's, Android PacKage files, "executables",
can find samples on places besides Google Play
(security?)
– and more!
http://developer.android.com/guide/developing/tools/adb.html
Dalvik Debug Monitor Server
• DDMS
• debugging tool
• "provides, screen capture on the device, thread
and heap information on the device, logcat,
process, and radio state information, incoming
call and SMS spoofing, location data spoofing,
and more."
• can interact with DDMS via Eclipse plugin,
another view in Eclipse
DDMS