SlideShare a Scribd company logo
1


Day 1
Session 1
What is Android?

      Android is a software stack for mobile devices that includes an operating system, middleware
       and key applications.
      Android gives you a world-class platform for creating apps and games for Android users


Android version

      Android 1.0
      Android 1.1
      Cupcake 1.5
      Donut 1.6
      Éclair 2.0/2.1
      Froyo 2.2.x
      Gingerbread 2.3.x
      Honeycomb 3.x
      Ice Cream Sandwich 4.0.x
      Jelly Bean 4.1

       Being an Android user you may know how the basic functions such as making a call, sending a
       text message, changing the system settings, install or uninstall apps etc. Well! All Android users
       know these, but not enough for a developer. Then what else details are a developer required to
       know about Android, I’ll explain. To be a developer, you should know all the key concepts of
       Android. That is, you should know all the nuts and bolts of Android OS.




                   @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
2


Android Architecture




The above figure shows the diagram of Android Architecture. The Android OS can be referred to as a
software stack of different layers, where each layer is a group of sveral program components. Together
it includes operating system, middleware and important applications. Each layer in the architecture
provides different services to the layer just above it. We will examine the features of each layer in detail.

Linux Kernel

The basic layer is the Linux kernel. The whole Android OS is built on top of the Linux 2.6 Kernel with
some further architectural changes made by Google. It is this Linux that interacts with the hardware and
contains all the essential hardware drivers. Drivers are programs that control and communicate with the
hardware. For example, consider the Bluetooth function. All devices has a Bluetooth hardware in it.
Therefore the kernel must include a Bluetooth driver to communicate with the Bluetooth hardware. The
Linux kernel also acts as an abstraction layer between the hardware and other software layers. Android
uses the Linux for all its core functionality such as Memory management, process management,
networking, security settings etc. As the Android is built on a most popular and proven foundation, it
made the porting of Android to variety of hardware, a relatively painless task.




                    @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
3


Libraries

The next layer is the Android’s native libraries. It is this layer that enables the device to handle
different types of data. These libraries are written in c or c++ language and are specific for a
particular hardware.

Some of the important native libraries include the following:

Surface Manager: It is used for compositing window manager with off-screen buffering. Off-screen
buffering means you cant directly draw into the screen, but your drawings go to the off-screen buffer.
There it is combined with other drawings and form the final screen the user will see. This off screen
buffer is the reason behind the transparency of windows.

Media framework: Media framework provides different media codecs allowing the recording and
playback of different media formats

SQLite: SQLite is the database engine used in android for data storage purposes

WebKit: It is the browser engine used to display HTML content

OpenGL: Used to render 2D or 3D graphics content to the screen

Android Runtime

Android Runtime consists of Dalvik Virtual machine and Core Java libraries.

Dalvik Virtual Machine

It is a type of JVM used in android devices to run apps and is optimized for low processing power and
low memory environments. Unlike the JVM, the Dalvik Virtual Machine doesn’t run .class files, instead
it runs .dex files. .dex files are built from .class file at the time of compilation and provides hifger
efficiency in low resource environments. The Dalvik VM allows multiple instance of Virtual machine to
be created simultaneously providing security, isolation, memory management and threading support. It is
developed by Dan Bornstein of Google.

Core Java Libraries
These are different from Java SE and Java ME libraries. However these libraries provides most of the
functionalities defined in the Java SE libraries.




                    @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
4


Application Framework

These are the blocks that our applications directly interacts with. These programs manage the basic
functions of phone like resource management, voice call management etc. As a developer, you just
consider these are some basic tools with which we are building our applications.

Important blocks of Application framework are:

Activity Manager: Manages the activity life cycle of applications

Content Providers: Manage the data sharing between applications

Telephony Manager: Manages all voice calls. We use telephony manager if we want to access voice
calls in our application.

Location Manager: Location management, using GPS or cell tower

Resource Manager: Manage the various types of resources we use in our Application

Applications

Applications are the top layer in the Android architecture and this is where our applications are gonna fit.
Several standard applications comes pre-installed with every device, such as:

       SMS client app
       Dialer
       Web browser
       Contact manager

As a developer we are able to write an app which replace any existing system app. That is, you are not
limited in accessing any particular feature. You are practically limitless and can whatever you want to do
with the android (as long as the users of your app permits it). Thus Android is opening endless
opportunities to the developer.




                    @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
5



Session 2
Setting android environment

  Please refer the PDF
  Day_1_Set up Andoid Environment.pdf


Create project using Eclipse




                  @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
6




@COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
7



Session 3
Understanding an android application structure




src:in the src we keep all the java file
res: we dump the resources into the res folder where we keep all the images , layouts and more on
drawable: here we keep all the images required for an application
layout: in the layout folder we keep all the layout related xml files
value : in the value folder we add the parameters such as String , dimen , styles

Understanding the LDPI , MDPI , HDPI




      small screens are at least 426dp x 320dp
      normal screens are at least 470dp x 320dp
      large screens are at least 640dp x 480dp
      xlarge screens are at least 960dp x 720dp



                   @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
8



Session 4
Introduction to android components

      Activities
      Services
      Content providers
      Broadcast receivers


                                                Activity

      Activity : In Android, an activity is represent a single screen.
      Most applications have multiple activities to represent different screens.
      Any user interface screen is called as an activity.

                                              Service
      A Service is a component which runs in the background, without interacting with the user.
      For example, a service might handle network transactions, play music, perform file I/O, or
       interact with a content provider, all from the background.

                                        Content Providers
      Content Providers are the only way to share data across Android applications. They store and
       retrieve data thus making it accessible to all.
      Android platform provides default implementations of content providers for data types like
       audio, video, images, contact information etc.

                                    Broadcast receivers
      A broadcast receiver is a component that responds to system-wide broadcast announcements.
       Many broadcasts originate from the system—
      For example, a broadcast announcing that the screen has turned off, the battery is low, or a
       picture was captured.




                   @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)

More Related Content

PDF
Android development Training Programme Day 2
PDF
Android dev o_auth
ODP
Anatomy of android application
ODP
Ppt 2 android_basics
PDF
Android Basic Components
PPT
PPT
Android tutorial for beginners-traininginbangalore.com
PPT
Day 4: Android: Getting Active through Activities
Android development Training Programme Day 2
Android dev o_auth
Anatomy of android application
Ppt 2 android_basics
Android Basic Components
Android tutorial for beginners-traininginbangalore.com
Day 4: Android: Getting Active through Activities

What's hot (19)

PDF
Introduction to android
PPTX
Android apps development
PPT
Android Training in Chandigarh | Industrial Training in Android Apps Development
PDF
Marakana android-java developers
PDF
Lecture 3 getting active through activities
PDF
Android Components
PPT
Android应用开发简介
PPTX
Android development basic _ZuoSyuanWang
PPTX
PPTX
Android components
PPT
Synapseindia android application development tutorial
PPT
Synapseindia android apps development tutorial
PDF
Android UI Fundamentals part 1
PDF
PDF
Marakana Android User Interface
PDF
Android studio
PPTX
Development Playbook Application With Adobe AIR 2.5 and QNX SDK
PPTX
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
PDF
Android session 2
Introduction to android
Android apps development
Android Training in Chandigarh | Industrial Training in Android Apps Development
Marakana android-java developers
Lecture 3 getting active through activities
Android Components
Android应用开发简介
Android development basic _ZuoSyuanWang
Android components
Synapseindia android application development tutorial
Synapseindia android apps development tutorial
Android UI Fundamentals part 1
Marakana Android User Interface
Android studio
Development Playbook Application With Adobe AIR 2.5 and QNX SDK
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Android session 2
Ad

Similar to Android development training programme Day 1 (20)

PPTX
Android 1-intro n architecture
PDF
Android fundamentals and tutorial for beginners
PDF
Android Workshop Part 1
PDF
Wifi Direct Based Chat And File Transfer Android Application
DOC
Google android white paper
PPTX
Androidoverview 100405150711-phpapp01
PDF
Android : Revolutionizing Mobile Devices
PPTX
01. Introduction to Android_lecture1.pptx
PPTX
Getting started with android
PPT
Mobile appliaction w android week 1 by osama
PDF
Android Introduction by Kajal
PDF
android app development training report
PDF
Android development-tutorial
PDF
Android and its feature
PPTX
Basic of Android App Development
PPT
Chapter 1 Introduction to android.ppt pl
PPTX
architecture of android.pptx
PPTX
UNIT-1 INTRODUCTION TO ANDROID [Autosaved].pptx
PDF
20IT601PE - Mobile Application Development PPT.pdf
PPTX
Android quick talk
Android 1-intro n architecture
Android fundamentals and tutorial for beginners
Android Workshop Part 1
Wifi Direct Based Chat And File Transfer Android Application
Google android white paper
Androidoverview 100405150711-phpapp01
Android : Revolutionizing Mobile Devices
01. Introduction to Android_lecture1.pptx
Getting started with android
Mobile appliaction w android week 1 by osama
Android Introduction by Kajal
android app development training report
Android development-tutorial
Android and its feature
Basic of Android App Development
Chapter 1 Introduction to android.ppt pl
architecture of android.pptx
UNIT-1 INTRODUCTION TO ANDROID [Autosaved].pptx
20IT601PE - Mobile Application Development PPT.pdf
Android quick talk
Ad

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
master seminar digital applications in india
PDF
Insiders guide to clinical Medicine.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Classroom Observation Tools for Teachers
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Complications of Minimal Access Surgery at WLH
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Institutional Correction lecture only . . .
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
master seminar digital applications in india
Insiders guide to clinical Medicine.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Microbial disease of the cardiovascular and lymphatic systems
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Classroom Observation Tools for Teachers
Abdominal Access Techniques with Prof. Dr. R K Mishra
Anesthesia in Laparoscopic Surgery in India
Complications of Minimal Access Surgery at WLH
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
VCE English Exam - Section C Student Revision Booklet
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Computing-Curriculum for Schools in Ghana
Institutional Correction lecture only . . .

Android development training programme Day 1

  • 1. 1 Day 1 Session 1 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware and key applications.  Android gives you a world-class platform for creating apps and games for Android users Android version  Android 1.0  Android 1.1  Cupcake 1.5  Donut 1.6  Éclair 2.0/2.1  Froyo 2.2.x  Gingerbread 2.3.x  Honeycomb 3.x  Ice Cream Sandwich 4.0.x  Jelly Bean 4.1 Being an Android user you may know how the basic functions such as making a call, sending a text message, changing the system settings, install or uninstall apps etc. Well! All Android users know these, but not enough for a developer. Then what else details are a developer required to know about Android, I’ll explain. To be a developer, you should know all the key concepts of Android. That is, you should know all the nuts and bolts of Android OS. @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
  • 2. 2 Android Architecture The above figure shows the diagram of Android Architecture. The Android OS can be referred to as a software stack of different layers, where each layer is a group of sveral program components. Together it includes operating system, middleware and important applications. Each layer in the architecture provides different services to the layer just above it. We will examine the features of each layer in detail. Linux Kernel The basic layer is the Linux kernel. The whole Android OS is built on top of the Linux 2.6 Kernel with some further architectural changes made by Google. It is this Linux that interacts with the hardware and contains all the essential hardware drivers. Drivers are programs that control and communicate with the hardware. For example, consider the Bluetooth function. All devices has a Bluetooth hardware in it. Therefore the kernel must include a Bluetooth driver to communicate with the Bluetooth hardware. The Linux kernel also acts as an abstraction layer between the hardware and other software layers. Android uses the Linux for all its core functionality such as Memory management, process management, networking, security settings etc. As the Android is built on a most popular and proven foundation, it made the porting of Android to variety of hardware, a relatively painless task. @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
  • 3. 3 Libraries The next layer is the Android’s native libraries. It is this layer that enables the device to handle different types of data. These libraries are written in c or c++ language and are specific for a particular hardware. Some of the important native libraries include the following: Surface Manager: It is used for compositing window manager with off-screen buffering. Off-screen buffering means you cant directly draw into the screen, but your drawings go to the off-screen buffer. There it is combined with other drawings and form the final screen the user will see. This off screen buffer is the reason behind the transparency of windows. Media framework: Media framework provides different media codecs allowing the recording and playback of different media formats SQLite: SQLite is the database engine used in android for data storage purposes WebKit: It is the browser engine used to display HTML content OpenGL: Used to render 2D or 3D graphics content to the screen Android Runtime Android Runtime consists of Dalvik Virtual machine and Core Java libraries. Dalvik Virtual Machine It is a type of JVM used in android devices to run apps and is optimized for low processing power and low memory environments. Unlike the JVM, the Dalvik Virtual Machine doesn’t run .class files, instead it runs .dex files. .dex files are built from .class file at the time of compilation and provides hifger efficiency in low resource environments. The Dalvik VM allows multiple instance of Virtual machine to be created simultaneously providing security, isolation, memory management and threading support. It is developed by Dan Bornstein of Google. Core Java Libraries These are different from Java SE and Java ME libraries. However these libraries provides most of the functionalities defined in the Java SE libraries. @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
  • 4. 4 Application Framework These are the blocks that our applications directly interacts with. These programs manage the basic functions of phone like resource management, voice call management etc. As a developer, you just consider these are some basic tools with which we are building our applications. Important blocks of Application framework are: Activity Manager: Manages the activity life cycle of applications Content Providers: Manage the data sharing between applications Telephony Manager: Manages all voice calls. We use telephony manager if we want to access voice calls in our application. Location Manager: Location management, using GPS or cell tower Resource Manager: Manage the various types of resources we use in our Application Applications Applications are the top layer in the Android architecture and this is where our applications are gonna fit. Several standard applications comes pre-installed with every device, such as:  SMS client app  Dialer  Web browser  Contact manager As a developer we are able to write an app which replace any existing system app. That is, you are not limited in accessing any particular feature. You are practically limitless and can whatever you want to do with the android (as long as the users of your app permits it). Thus Android is opening endless opportunities to the developer. @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
  • 5. 5 Session 2 Setting android environment Please refer the PDF Day_1_Set up Andoid Environment.pdf Create project using Eclipse @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
  • 6. 6 @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
  • 7. 7 Session 3 Understanding an android application structure src:in the src we keep all the java file res: we dump the resources into the res folder where we keep all the images , layouts and more on drawable: here we keep all the images required for an application layout: in the layout folder we keep all the layout related xml files value : in the value folder we add the parameters such as String , dimen , styles Understanding the LDPI , MDPI , HDPI  small screens are at least 426dp x 320dp  normal screens are at least 470dp x 320dp  large screens are at least 640dp x 480dp  xlarge screens are at least 960dp x 720dp @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)
  • 8. 8 Session 4 Introduction to android components  Activities  Services  Content providers  Broadcast receivers Activity  Activity : In Android, an activity is represent a single screen.  Most applications have multiple activities to represent different screens.  Any user interface screen is called as an activity. Service  A Service is a component which runs in the background, without interacting with the user.  For example, a service might handle network transactions, play music, perform file I/O, or interact with a content provider, all from the background. Content Providers  Content Providers are the only way to share data across Android applications. They store and retrieve data thus making it accessible to all.  Android platform provides default implementations of content providers for data types like audio, video, images, contact information etc. Broadcast receivers  A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—  For example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. @COPYRIGHTS BY Dhiraj P. karalkar (Karalkar.dhiraj@gmail.com)