0% found this document useful (0 votes)
36 views51 pages

Overview of Android Platform

Uploaded by

Eng Balexis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views51 pages

Overview of Android Platform

Uploaded by

Eng Balexis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

NW 100: Introduction to Mobile

Computing

LT8: Android Overview and


Android Development Environment

Drake Patrick Mirembe


Directorate of Engagement, Research and Innovation
Uganda Technology and Management University

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?

• Android is a software stack


for mobile devices that
includes an operating
system, middleware and
key applications.

3
Phones

HTC G1,
Droid, Motorola Droid (X)
Tattoo

Suno S880 Samsung Galaxy Sony Ericsson

4
Tablets

Velocity Micro Cruz Gome FlyTouch Acer beTouch

Toshiba Android Cisco Android Tablet


Dawa D7 SmartBook

5
MarketShare

Feb’10 May’10 Apr’11


RIM 42.1% 41.7% 29%
Apple 25.4% 24.4% 25%
Google 9% 13% 33%
Microsoft 15.1% 13.2% 7.7%
Palm 5.4% 4.8% 2.9%

6
Architecture

http://developer.android.com/guide/basics/what-is-android.html
7
Android S/W Stack - Application

• Android provides a set of core applications:


 Email Client
 SMS Program
 Calendar
 Maps
 Browser
 Contacts
 Etc
• All applications are written using the Java language.

8
Android S/W Stack – App Framework

• Most of the application framework accesses


these core libraries through the Dalvik VM,
the gateway to the Android Platform

9
Android S/W Stack –
App Framework (Cont)
Feature Role

View Used to build an application, including lists, grids, text


System boxes, buttons, and embedded web browser

Content Enabling applications to access data from other


Provider applications or to share their own data

Resource Providing access to non-code resources (localized string


Manager , graphics, and layout files)

Notification Enabling all applications to display customer alerts in the


Manager status bar

Activity Managing the lifecycle of applications and providing


Manager a common navigation backstack

10
Location Manager
Notification Manager
Notification Manager
• How background app interact with users

• Consistent notification presentation


View System
View System
Android S/W Stack - Libraries

• Including a set of C/C++ libraries used by components of


the Android system
• Exposed to developers through the Android application
framework

@2010 Mihail L. Sichitiu 16


Android S/W Stack - Libraries
• The media libraries are based on PacketVideo’s
(http://www.packetvideo.com/) OpenCORE. These libraries are
responsible for recording and playback of audio and video formats.
A library called Surface Manager controls access to the display system
and supports 2D and 3D.
• The WebKit library is responsible for browser support; it is the same
library that supports Google Chrome and Apple Inc.’s Safari.
The FreeType library is responsible for font support.
SQLite (http://www.sqlite.org/) is a relational database that is
available on the device itself. SQLite is also an independent open
source effort for relational databases and not directly tied to Android.
You can acquire and use tools meant for SQLite for Android databases
as well.
Android Features
• Application framework enabling reuse and replacement of components
• Dalvik virtual machine optimized for mobile devices
• Integrated browser based on the open source WebKit engine
• Optimized graphics powered by a custom 2D graphics library; 3D graphics
based on the OpenGL ES 1.0 specification (hardware acceleration optional)
• SQLite for structured data storage
• Media support for common audio, video, and still image formats (MPEG4,
H.264, MP3, AAC, AMR, JPG, PNG, GIF)
• GSM Telephony (hardware dependent)
• Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
• Camera, GPS, compass, and accelerometer (hardware dependent)
• Rich development environment including a device emulator, tools for
debugging, memory and performance profiling, and a plugin for the Eclipse
IDE
A Short History Of Android
• 2001 Palm Kyocera 6035, combing PDA and phone
• 2003 - Blackberry smartphone released
• 2005
– Google acquires startup Android Inc. to start Android platform.
– Work on Dalvik VM begins
• 2007
– Open Handset Alliance announced
– Early look at SDK
– June, iPhone released
• 2008
– Google sponsors 1st Android Developer Challenge
– T-Mobile G1 announced, released fall
– SDK 1.0 released
– Android released open source (Apache License)
– Android Dev Phone 1 released
Short History cont.
• 2009
– SDK 1.5 (Cupcake)
• New soft keyboard with “autocomplete” feature
– SDK 1.6 (Donut)
• Support Wide VGA
– SDK 2.0/2.0.1/2.1 (Eclair)
• Revamped UI, browser
• 2010
– Nexus One released to the public
– SDK 2.2 (Froyo)
• Flash support, tethering
– SDK 2.3 (Gingerbread)
• UI update, system-wide copy-paste
Short History cont.
• 2011
– SDK 3.0 (Honeycomb) for tablets only
• New UI for tablets, support multi-core processors,
fragments
– SDK 3.1 and 3.2
• Hardware support and UI improvements
– SDK 4.0 (Ice Cream Sandwich)
• For Q4, combination of Gingerbread and Honeycomb

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

1.5 Cupcake: 0.6%


1.6 Donut: 1.1%
2.1 Ecliar 8.5%
• Based on active devices 2.2 Froyo 30.4%
• Forward compatible 2.3 Gingerbread: 56%
• Not necessarily 3.X Honeycomb 3.3%
backward compatible 4.x Ice Cream Sand. 0.6%
http://developer.android.com/resources/dashboard/platform-versions.html
Device Distribution July 2012
August 1, 2012
August 1, 2013
• Based on device visits to Google Play
January 8, 2014
• Based on device visits to Google Play
Devices and Apps
• Estimated 1 billion+ as of Sept. 2013 activated devices
– 2012 - 400M, 2011 - 100M
• Estimated 1.5M new activations per day
– 2012 - 1M
– 2014 expected to ship 1 billion devices this year
• Google Play (formerly Android Market)
– > 1,000,000 apps
– 600,000 apps, June 2012
– 2/3 free, 1/3 paid
– Apple App Store, >825,000 apps April 2013
– Apple and Google each claim 50,000,000,000 downloads
• What's old is new - Mac vs. PC
iPhone vs. Android???
iPhone vs. Android
Developer Revenues

• 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

or use the command line


http://developer.android.com/guide/developing/devices/managing-avds-cmdline.html
Android Runtime: Dalvik VM
• Subset of Java developed by Google
• Optimized for mobile devices (better memory
management, battery utilization, etc.)
• Dalvik runs .dex files that are compiled from
.class files
• Introduces new libraries
• Does not support some Java libraries like AWT,
Swing
• http://developer.android.com/reference/packages.html
Or From the Command Line
C:\android-sdk-windows\tools>android create avd -n MyDevice -t android-8
Android 2.2 is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Created AVD 'MyDevice2' based on Android 2.2, Device name
with the following hardware config:
Target platform
hw.lcd.density=240
vm.heapSize=24

C:\android-sdk-windows\tools>emulator -avd MyDevice

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

Byte code <xml>

Other .class files AndroidManifest.xml .apk

<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

You might also like