SlideShare a Scribd company logo
Chapter1
Getting started with Android
Programming
What is Android?
• Features of Android
• Architecture
• Architecture of Android
• The Android Market
• The Android Developer Community
Obtaining the Required Tools
• Android SDK
• Installing the Android SDK Tools
• Configuring the Android SDK Manager
• Eclipse
• Android Development Tool (ADT)
• Creating Android Virtual Device (AVDs)
• Creating your first Android App
• Anatomy of an Android Application
• Summary
What is Android?
 Android is a software stack for
mobile devices that includes an
operating system, middleware
and key applications.
Version
Android Versions
Versions Released Date Codename
1.1 9 Feb 2009
1.5 30 April 2009 Cupcake
1.6 15 September 2009 Donut
2.0/2.1 26 October 2009 Eclair
2.2 20 May 2010 Froyo
2.3 6 December 2010 Gingerbread
3.0/3.1/3.2 22 Feb 2011 Honeycomb
4.0 19 October 2011 Ice cream Sandwich
Android Features
• Storage
• Connectivity
• Message
• Web Browser
• Media Support
Android Architecture
10
• Android provides a set of core applications:
 Email Client
 SMS Program
 Calendar
 Maps
 Browser
 Contacts
 Etc
• All applications are written using the Java language.
Android - Applications
11
• Enabling and simplifying the reuse of
components
 Developers have full access to the same
framework APIs used by the core applications.
 Users are allowed to replace components.
Android – App Framework
@2011 Mihail L. Sichitiu 12
• Features
Feature Role
View
System
Used to build an application, including lists, grids, text
boxes, buttons, and embedded web browser
Content
Provider
Enabling applications to access data from other
applications or to share their own data
Resource
Manager
Providing access to non-code resources (localized strings, graphics, and
layout files)
Notification
Manager
Enabling all applications to display customer alerts in the
status bar
Activity
Manager
Managing the lifecycle of applications and providing
a common navigation backstack
Android – App Framework (cont)
@2011 Mihail L. Sichitiu 13
• Including a set of C/C++ libraries used by
components of the Android system
• Exposed to developers through the Android
application framework
Android - Libraries
@2011 Mihail L. Sichitiu 14
• Core Libraries
 Providing most of the functionality available in the core
libraries of the Java language
 APIs
Data Structures
Utilities
File Access
Network Access
Graphics
Etc
Android - Runtimes
@2011 Mihail L. Sichitiu 15
• Dalvik Virtual Machine
Providing environment on which every Android
application runs
Each Android application runs in its own process, with
its own instance of the Dalvik VM.
Dalvik has been written such that a device can run
multiple VMs efficiently.
Register-based virtual machine
Android – Runtimes (cont)
@2011 Mihail L. Sichitiu 16
• Dalvik Virtual Machine (Cont)
Executing the Dalvik Executable (.dex) format
.dex format is optimized for minimal memory footprint.
Compilation
Relying on the Linux Kernel for:
Threading
Low-level memory management
Android – Runtimes (cont)
@2011 Mihail L. Sichitiu 17
 Relying on Linux Kernel for core system services
 Memory and Process Management
 Network Stack
 Driver Model
 Security
 Providing an abstraction layer between the H/W and the rest of the S/W sta
ck
Android - Kernel
Android Devices in the Market
• Smart Phone
• Tablets
• E-reader
• Netbooks
• Mp4 Player
• Internet TV
@2011 Mihail L. Sichitiu 19
Phones
HTC G1,
Droid,
Tattoo
Motorola Droid (X)
Suno S880 Samsung Galaxy Sony Ericsson
@2011 Mihail L. Sichitiu 20
Tablets
Velocity Micro Cruz Gome FlyTouch Acer beTouch
Dawa D7
Toshiba Android
SmartBook
Cisco Android Tablet
Android Market
• In August 2008, Google announced Android
Market and made it available in Oct 2008.
• Preinstall in every android devices.
• To download third-party application
Android Developer Community
• Stack Overflow
• Google Android Training
(http://developer.android.com/training/index.
html )
• Android Discuss
(http://groups.google.com/group/android-
discuss)
Android Development Tools
Source
code
Auto-generated
code
UI
layout
String
constants
Configuration
1 public classHelloAndroidextends Activity {
2 /** Called when the activity is first created. */
3 @Override
4 public voidonCreate(BundlesavedInstanceState)
5 {
6 super.onCreate(savedInstanceState);
7 setContentView(R.layout.main);
8 }
9 }
HelloAndroid.java
1<?xml version="1.0" encoding="utf-8"?>
2<LinearLayout
3xmlns:android="http://schemas.android.com/apk/res/android"
4android:orientation="vertical"
5android:layout_width="fill_parent"
6android:layout_height="fill_parent"
7>
8<TextView
9android:layout_width="fill_parent"
10android:layout_height="wrap_content"
11android:text="@string/hello "
12 />
13</LinearLayout>
main.xml
1<?xml version="1.0"encoding="utf-8"?>
2<resources>
3 <string name="hello">Hello World, HelloAndroid!
4</string>
5<string name="app_name">Hello, Android</string>
6 </resources>
strings.xml
1 <?xml version="1.0"encoding="utf-8"?>
2 <manifest
3 xmlns:android="http://schemas.android.com/apk/res/android"
4 package="edu.upenn.cis542"
5 android:versionCode="1"
6 android:versionName="1.0">
7 <application android:icon="@drawable/icon"
8 android:label="@string/app_name">
9 <activity android:name=".HelloAndroid"
10 android:label="@string/app_name">
11 <intent-filter>
12 <action
13 android:name="android.intent.action.MAIN" />
14 <category
15 android:name="android.intent.category.LAUNCHER"/>
16 </intent-filter>
17 </activity>
18 </application>
19 </manifest>
AndroidManifest.xml

More Related Content

What's hot

Android Operating System Architecture
Android Operating System ArchitectureAndroid Operating System Architecture
Android Operating System Architecture
DINESH KUMAR ARIVARASAN
 
Android architecture
Android architectureAndroid architecture
Android architecture
Saurabh Kukreja
 
Android overview
Android overviewAndroid overview
Android overview
Mallikarjuna G D
 
01 02 - introduction - adroid stack
01  02 - introduction - adroid stack01  02 - introduction - adroid stack
01 02 - introduction - adroid stack
Siva Kumar reddy Vasipally
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
Pietro Alberto Rossi
 
Android : Architecture & Components
Android : Architecture & ComponentsAndroid : Architecture & Components
Android : Architecture & Components
Akash Bisariya
 
Getting started with android
Getting started with androidGetting started with android
Getting started with android
amitgb
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introductionmehfooz7007
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
Shumaila Khan
 
Android architecture
Android architectureAndroid architecture
Android architectureHari Krishna
 
Android ppt
Android pptAndroid ppt
Android app development India
Android app development IndiaAndroid app development India
Android app development India
Point Perfect Technology Solutions
 
Android OS and application development
Android OS and application developmentAndroid OS and application development
Android OS and application development
Lokesh Kumar
 
Android
Android Android
Android
Anand Buddarapu
 
What's New in Tizen 2?
What's New in Tizen 2?What's New in Tizen 2?
What's New in Tizen 2?
Leon Anavi
 

What's hot (20)

Android Operating System Architecture
Android Operating System ArchitectureAndroid Operating System Architecture
Android Operating System Architecture
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android
AndroidAndroid
Android
 
Android overview
Android overviewAndroid overview
Android overview
 
01 02 - introduction - adroid stack
01  02 - introduction - adroid stack01  02 - introduction - adroid stack
01 02 - introduction - adroid stack
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
 
Android : Architecture & Components
Android : Architecture & ComponentsAndroid : Architecture & Components
Android : Architecture & Components
 
Getting started with android
Getting started with androidGetting started with android
Getting started with android
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android 1
Android 1 Android 1
Android 1
 
Android
Android Android
Android
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android.ppt
Android.pptAndroid.ppt
Android.ppt
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android app development India
Android app development IndiaAndroid app development India
Android app development India
 
Android OS and application development
Android OS and application developmentAndroid OS and application development
Android OS and application development
 
Android
Android Android
Android
 
What's New in Tizen 2?
What's New in Tizen 2?What's New in Tizen 2?
What's New in Tizen 2?
 

Viewers also liked

Pasos para subir un video en youtube.pptx mayra y estefany
Pasos para subir un video en youtube.pptx mayra y estefanyPasos para subir un video en youtube.pptx mayra y estefany
Pasos para subir un video en youtube.pptx mayra y estefany
MAYTE1125
 
LinkedIn Publisher Offerings - InShare (April 2013)
LinkedIn Publisher Offerings - InShare (April 2013)LinkedIn Publisher Offerings - InShare (April 2013)
LinkedIn Publisher Offerings - InShare (April 2013)
Alexander Variano
 
Uu nomor 8 tahun 1985 tentang organisasi kemasyarakatan
Uu nomor 8 tahun 1985 tentang organisasi kemasyarakatanUu nomor 8 tahun 1985 tentang organisasi kemasyarakatan
Uu nomor 8 tahun 1985 tentang organisasi kemasyarakatanJamhur Ilmi
 
¿Qué comiste y bebiste ayer?
¿Qué comiste y bebiste ayer?¿Qué comiste y bebiste ayer?
¿Qué comiste y bebiste ayer?HA MFL Department
 
Question 2 Media Evaluation
Question 2 Media EvaluationQuestion 2 Media Evaluation
Question 2 Media EvaluationHollie15
 
The renaissance l cong review
The renaissance l cong reviewThe renaissance l cong review
The renaissance l cong reviewaiesechyderabad
 
Com.epost.psf.smi
Com.epost.psf.smiCom.epost.psf.smi
Com.epost.psf.smismartepost
 
Tma 2 observations of an expert and a novice teacher
Tma 2 observations of an expert and a novice teacherTma 2 observations of an expert and a novice teacher
Tma 2 observations of an expert and a novice teacherJoan Hope Elgincolin
 
Best Finance Award Application
Best Finance Award ApplicationBest Finance Award Application
Best Finance Award Applicationaiesechyderabad
 
Archaeobacteria dan eubacteria
Archaeobacteria dan eubacteriaArchaeobacteria dan eubacteria
Archaeobacteria dan eubacteriaMariia Theresia
 
Fse2012 - Who is going to Mentor Newcomers in Open Source Projects?
Fse2012 - Who is going to Mentor Newcomers in Open Source Projects?Fse2012 - Who is going to Mentor Newcomers in Open Source Projects?
Fse2012 - Who is going to Mentor Newcomers in Open Source Projects?Sebastiano Panichella
 

Viewers also liked (20)

Pasos para subir un video en youtube.pptx mayra y estefany
Pasos para subir un video en youtube.pptx mayra y estefanyPasos para subir un video en youtube.pptx mayra y estefany
Pasos para subir un video en youtube.pptx mayra y estefany
 
LinkedIn Publisher Offerings - InShare (April 2013)
LinkedIn Publisher Offerings - InShare (April 2013)LinkedIn Publisher Offerings - InShare (April 2013)
LinkedIn Publisher Offerings - InShare (April 2013)
 
Uu nomor 8 tahun 1985 tentang organisasi kemasyarakatan
Uu nomor 8 tahun 1985 tentang organisasi kemasyarakatanUu nomor 8 tahun 1985 tentang organisasi kemasyarakatan
Uu nomor 8 tahun 1985 tentang organisasi kemasyarakatan
 
La publicidad 51212
La publicidad 51212La publicidad 51212
La publicidad 51212
 
¿Qué comiste y bebiste ayer?
¿Qué comiste y bebiste ayer?¿Qué comiste y bebiste ayer?
¿Qué comiste y bebiste ayer?
 
AIESEC Pop Quiz
AIESEC Pop QuizAIESEC Pop Quiz
AIESEC Pop Quiz
 
Question 2 Media Evaluation
Question 2 Media EvaluationQuestion 2 Media Evaluation
Question 2 Media Evaluation
 
The renaissance l cong review
The renaissance l cong reviewThe renaissance l cong review
The renaissance l cong review
 
Com.epost.psf.smi
Com.epost.psf.smiCom.epost.psf.smi
Com.epost.psf.smi
 
Connect for Lunch Explained
Connect for Lunch ExplainedConnect for Lunch Explained
Connect for Lunch Explained
 
O gip agm ppt
O gip agm pptO gip agm ppt
O gip agm ppt
 
Tma 2 observations of an expert and a novice teacher
Tma 2 observations of an expert and a novice teacherTma 2 observations of an expert and a novice teacher
Tma 2 observations of an expert and a novice teacher
 
¿Por dónde se va?
¿Por dónde se va?¿Por dónde se va?
¿Por dónde se va?
 
Think Laterally | LEAD
Think Laterally | LEADThink Laterally | LEAD
Think Laterally | LEAD
 
Oqi
OqiOqi
Oqi
 
The skeletal system
The skeletal systemThe skeletal system
The skeletal system
 
Xd soga
Xd sogaXd soga
Xd soga
 
Best Finance Award Application
Best Finance Award ApplicationBest Finance Award Application
Best Finance Award Application
 
Archaeobacteria dan eubacteria
Archaeobacteria dan eubacteriaArchaeobacteria dan eubacteria
Archaeobacteria dan eubacteria
 
Fse2012 - Who is going to Mentor Newcomers in Open Source Projects?
Fse2012 - Who is going to Mentor Newcomers in Open Source Projects?Fse2012 - Who is going to Mentor Newcomers in Open Source Projects?
Fse2012 - Who is going to Mentor Newcomers in Open Source Projects?
 

Similar to Chapter1

Introduction to Android.ppt
Introduction to Android.pptIntroduction to Android.ppt
Introduction to Android.ppt
ahmadfaisal744721
 
Knowledge about android operating system
Knowledge about android operating systemKnowledge about android operating system
Knowledge about android operating system
Rachna Beegun
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
stevenindands
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
Aravindharamanan S
 
introduction.ppt
introduction.pptintroduction.ppt
introduction.ppt
sankalp810108
 
presentation on Android
presentation on Android presentation on Android
presentation on Android
nipun pasnoori
 
Android seminar report
Android seminar reportAndroid seminar report
Android seminar report
dgpune
 
Android development
Android developmentAndroid development
Android development
Raynax668
 
Outstanding Improvement Award Outstanding Improvement Award
Outstanding Improvement Award Outstanding Improvement AwardOutstanding Improvement Award Outstanding Improvement Award
Outstanding Improvement Award Outstanding Improvement Award
pravinmali2191
 
Android report.
Android report.Android report.
Android report.
Shivananda Rai
 
Part 1 robot in the making
Part 1 robot in the makingPart 1 robot in the making
Part 1 robot in the making
Michael Angelo Rivera
 
Android
AndroidAndroid
Android
jobyxg
 
Vijay android ppt
Vijay android pptVijay android ppt
Vijay android pptvijaymashre
 
IRJET - A Literature Review on Android -A Mobile Operating System
IRJET -  	  A Literature Review on Android -A Mobile Operating SystemIRJET -  	  A Literature Review on Android -A Mobile Operating System
IRJET - A Literature Review on Android -A Mobile Operating System
IRJET Journal
 
Android Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and VersionsAndroid Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and Versions
indiangarg
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
dipali badgujar
 
Android operating system
Android operating systemAndroid operating system
Android operating systemDev Savalia
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
lzongren
 
Mobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsMobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s Tools
Chandrakant Divate
 

Similar to Chapter1 (20)

Introduction to Android.ppt
Introduction to Android.pptIntroduction to Android.ppt
Introduction to Android.ppt
 
Knowledge about android operating system
Knowledge about android operating systemKnowledge about android operating system
Knowledge about android operating system
 
android
androidandroid
android
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
introduction.ppt
introduction.pptintroduction.ppt
introduction.ppt
 
presentation on Android
presentation on Android presentation on Android
presentation on Android
 
Android seminar report
Android seminar reportAndroid seminar report
Android seminar report
 
Android development
Android developmentAndroid development
Android development
 
Outstanding Improvement Award Outstanding Improvement Award
Outstanding Improvement Award Outstanding Improvement AwardOutstanding Improvement Award Outstanding Improvement Award
Outstanding Improvement Award Outstanding Improvement Award
 
Android report.
Android report.Android report.
Android report.
 
Part 1 robot in the making
Part 1 robot in the makingPart 1 robot in the making
Part 1 robot in the making
 
Android
AndroidAndroid
Android
 
Vijay android ppt
Vijay android pptVijay android ppt
Vijay android ppt
 
IRJET - A Literature Review on Android -A Mobile Operating System
IRJET -  	  A Literature Review on Android -A Mobile Operating SystemIRJET -  	  A Literature Review on Android -A Mobile Operating System
IRJET - A Literature Review on Android -A Mobile Operating System
 
Android Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and VersionsAndroid Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and Versions
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
 
Android operating system
Android operating systemAndroid operating system
Android operating system
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Mobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsMobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s Tools
 

Chapter1

  • 1. Chapter1 Getting started with Android Programming
  • 2. What is Android? • Features of Android • Architecture • Architecture of Android • The Android Market • The Android Developer Community
  • 3. Obtaining the Required Tools • Android SDK • Installing the Android SDK Tools • Configuring the Android SDK Manager • Eclipse • Android Development Tool (ADT) • Creating Android Virtual Device (AVDs)
  • 4. • Creating your first Android App • Anatomy of an Android Application • Summary
  • 5. What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware and key applications.
  • 7. Android Versions Versions Released Date Codename 1.1 9 Feb 2009 1.5 30 April 2009 Cupcake 1.6 15 September 2009 Donut 2.0/2.1 26 October 2009 Eclair 2.2 20 May 2010 Froyo 2.3 6 December 2010 Gingerbread 3.0/3.1/3.2 22 Feb 2011 Honeycomb 4.0 19 October 2011 Ice cream Sandwich
  • 8. Android Features • Storage • Connectivity • Message • Web Browser • Media Support
  • 10. 10 • Android provides a set of core applications:  Email Client  SMS Program  Calendar  Maps  Browser  Contacts  Etc • All applications are written using the Java language. Android - Applications
  • 11. 11 • Enabling and simplifying the reuse of components  Developers have full access to the same framework APIs used by the core applications.  Users are allowed to replace components. Android – App Framework
  • 12. @2011 Mihail L. Sichitiu 12 • Features Feature Role View System Used to build an application, including lists, grids, text boxes, buttons, and embedded web browser Content Provider Enabling applications to access data from other applications or to share their own data Resource Manager Providing access to non-code resources (localized strings, graphics, and layout files) Notification Manager Enabling all applications to display customer alerts in the status bar Activity Manager Managing the lifecycle of applications and providing a common navigation backstack Android – App Framework (cont)
  • 13. @2011 Mihail L. Sichitiu 13 • Including a set of C/C++ libraries used by components of the Android system • Exposed to developers through the Android application framework Android - Libraries
  • 14. @2011 Mihail L. Sichitiu 14 • Core Libraries  Providing most of the functionality available in the core libraries of the Java language  APIs Data Structures Utilities File Access Network Access Graphics Etc Android - Runtimes
  • 15. @2011 Mihail L. Sichitiu 15 • Dalvik Virtual Machine Providing environment on which every Android application runs Each Android application runs in its own process, with its own instance of the Dalvik VM. Dalvik has been written such that a device can run multiple VMs efficiently. Register-based virtual machine Android – Runtimes (cont)
  • 16. @2011 Mihail L. Sichitiu 16 • Dalvik Virtual Machine (Cont) Executing the Dalvik Executable (.dex) format .dex format is optimized for minimal memory footprint. Compilation Relying on the Linux Kernel for: Threading Low-level memory management Android – Runtimes (cont)
  • 17. @2011 Mihail L. Sichitiu 17  Relying on Linux Kernel for core system services  Memory and Process Management  Network Stack  Driver Model  Security  Providing an abstraction layer between the H/W and the rest of the S/W sta ck Android - Kernel
  • 18. Android Devices in the Market • Smart Phone • Tablets • E-reader • Netbooks • Mp4 Player • Internet TV
  • 19. @2011 Mihail L. Sichitiu 19 Phones HTC G1, Droid, Tattoo Motorola Droid (X) Suno S880 Samsung Galaxy Sony Ericsson
  • 20. @2011 Mihail L. Sichitiu 20 Tablets Velocity Micro Cruz Gome FlyTouch Acer beTouch Dawa D7 Toshiba Android SmartBook Cisco Android Tablet
  • 21. Android Market • In August 2008, Google announced Android Market and made it available in Oct 2008. • Preinstall in every android devices. • To download third-party application
  • 22. Android Developer Community • Stack Overflow • Google Android Training (http://developer.android.com/training/index. html ) • Android Discuss (http://groups.google.com/group/android- discuss)
  • 24.
  • 26. 1 public classHelloAndroidextends Activity { 2 /** Called when the activity is first created. */ 3 @Override 4 public voidonCreate(BundlesavedInstanceState) 5 { 6 super.onCreate(savedInstanceState); 7 setContentView(R.layout.main); 8 } 9 } HelloAndroid.java
  • 28. 1<?xml version="1.0"encoding="utf-8"?> 2<resources> 3 <string name="hello">Hello World, HelloAndroid! 4</string> 5<string name="app_name">Hello, Android</string> 6 </resources> strings.xml
  • 29. 1 <?xml version="1.0"encoding="utf-8"?> 2 <manifest 3 xmlns:android="http://schemas.android.com/apk/res/android" 4 package="edu.upenn.cis542" 5 android:versionCode="1" 6 android:versionName="1.0"> 7 <application android:icon="@drawable/icon" 8 android:label="@string/app_name"> 9 <activity android:name=".HelloAndroid" 10 android:label="@string/app_name"> 11 <intent-filter> 12 <action 13 android:name="android.intent.action.MAIN" /> 14 <category 15 android:name="android.intent.category.LAUNCHER"/> 16 </intent-filter> 17 </activity> 18 </application> 19 </manifest> AndroidManifest.xml