SlideShare a Scribd company logo
Introduction to Android
Development
By Kainda K. Daka
What is Android?
 Android is an open source and Linux-based operating system for mobile
devices such as smartphones and tablet computers. Android was developed by
the Open Handset Alliance, led by Google, and other companies.
 It is not just another operating system for high-end mobile phones….
 It is a software platform, rather than just an OS, that has the potential to be
utilized in a much wider range of devices.
 Android is an application framework on top of Linux, which facilitates its
rapid deployment in many domains.
History
 October 2003 - Android Inc. founded by Andy Rubin, Rich Miner, Nick Sears and
Chris White
 August 2005 - Google acquired Android Inc.
 November 2007 - Open Handset Alliance (OHA) formed
 September 2008 - Android 1.0 released
 April 2009 – Android 1.5 (Cup Cake)
 October 2006 - Android 2.0 (Eclair)
 May 2010 – Android 2.2 (Froyo)
 Dec 2010 – Android 2.3 (Gingerbread)
 Feb 2011 – Android 3.0 (HoneyComb)
 October 2011 – Android 4.0 (Ice Cream Sandwich)
 July 2012 – Android 4.1, 4.2 (Jelly Bean) to date
Android Architecture
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
Dalvik Virtual Machine
 This is not strictly a Java virtual machine.
 It was designed specifically for Android and is optimized in two key ways.
 Designed to be instantiated multiple times – each application has its own private
copy running in a Linux process.
 Also designed to be very memory efficient, being register based (instead of being
stack based like most Java VMs) and using its own bytecode implementation.
 The Dalvik VM makes full use of Linux for memory management and multi-
threading, which is intrinsic in the Java language.
 Android applications are commonly implemented in Java utilizing the Dalvik
VM.
 Accommodates interoperability which results in application portability, e.g.
the message sending capability of the SMS application can be used by another
application to send text messages.
Android distribution channels…
 The main distribution channel is Google Play (previously called Android
Market),
 App Geyser - Alternative free distribution channel
 Lots of other third party sites that offer direct download of the android APK.
 Apktop.com
Development Environment
 Full Java IDEs - Eclipse, IntelliJ, Netbeans and recently Android Studio
 Plugins and a download of the Google Android SDK are required for all the
above IDEs except for Android Studio which comes in-built.
 Graphical UI Builders - IDEs also provide GUI Builder for drag and drop
functionality
 Develop on Virtual Devices - You can specify your target configuration by
specifying an Android Virtual Device (AVD) during development
 Develop on Hardware Devices – Execute code on either the host-based
emulator or a real device, which is normally connected via USB.
 Powerful Debugging - Full Java debugger with on-device debugging and
Android-specific tools.
Programming Model
 An Android application consists of a number of resources which are bundled
into an archive – an Android package.
 Programs are generally written in Java, built using the standard Java
tools, and then the output file is processed to generate specific code for the
Dalvik VM.
 An application is a set of components which are instantiated and run as
required. There is not really an entry point or main() function.
 There are four types of application component: activities, services, broadcast
receivers, and content providers
An Activity…
 A functional unit of the application, which may be invoked by another
activity.
 It has a user interface of some form.
 An application may incorporate a number of activities.
 One activity may be nominated as the default which means that it may be
directly executed by the user.
A Service…
 Similar to an activity, except that it runs in the background
 Runs without a UI.
 An example of a service might be a media player that plays music while the
user performs other tasks.
Broadcast Receivers…
 Responds to a broadcast messages from other applications or from the
system.
 For example, it may be useful for the application to know when a picture has
been taken. This is the kind of event that may result in a broadcast message.
Content Provider
 Supplies data from one application to others on request.
 Requests are handled by the methods of the ContentResolver class.
 The data may be stored in the file system, the database or somewhere else
entirely.
Android Application Lifecycle
Application Lifecycle details…
 Resumed – The activity is in the foreground and the user can interact with it.
(Also sometimes referred to as the "running" state.)
 Paused – The activity is partially obscured by another activity—the other
activity that's in the foreground is semi-transparent or doesn't cover the
entire screen. It does not receive user input and cannot execute any code.
 Stopped - The activity is completely hidden and not visible to the user; it is
considered to be in the background. While stopped, the activity instance and
all its state information such as member variables is retained, but it cannot
execute any code.
 The other states (Created and Started) are transient and the system quickly
moves from them to the next state by calling the next lifecycle callback
method. That is, after the system calls onCreate(), it quickly calls
onStart(), which is quickly followed by onResume().
Physical Project Structure in Eclipse
Physical Project Structure in Eclipse…
 /SRC
 The src folder contains the Java source code files of your application organized
into packages
 /GEN
 Automatically generated files by the ADT. Here the R.java file contains
reference/index to all the resources in the res we use in our program.
 /ASSETS
 The assets folder is used to store raw asset files. You can keep any raw data in the
assets folder and there’s an asset manager in Android to read the data stored in
the folder. The raw data can be anything such as audio, video, images etc.
Physical Project Structure in Eclipse…
 /BIN
 /bin folder is where our compiled application files go. When we successfully
compile an application, this folder will contain java class files, dex files which are
executable under Dalvik virtual machine, apk archives etc.
 /RES
 /res folder is where we store all our external resources for our applications such as
images, layout XML files, strings, animations, audio files etc.
 /res/drawable - This folder contains the bitmap file to be used in the program
 /res/layout - XML files that defines the User Interface goes in this folder.
 /res/values - XML files that define simple values such as
strings, arrays, integers, dimensions, colors, styles etc. are placed in this folder.
 /res/menu - XML files that define menus in your application goes in this folder
AndroidManifest.xml
 One of the most important file in the Android project structure. It contains all
the information about your application.
 When an application is launched, the first file the system seeks is the
AndroidManifest.xml file. It actually works as a road map of your
application, for the system
 The Android Manifest file contains information about:
 Components of your application such as Activities, services etc.
 User permissions required
 Minimum level of Android API required
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest . . . >
<application . . . >
<activity android:name="co.za.momentum.ibrs.MyActivity" ... >
</activity>
. . .
</application>
</manifest>
AndroidManifest.xml
<application . . . >
<activity android:name="com.example.project.MyActivity" ... >
<intent-filter . . . >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
. . .
</application>
Demo and Question and Answers

More Related Content

What's hot (20)

PPTX
Arduino - Android Workshop Presentation
Hem Shrestha
 
PDF
Android App Development Intro at ESC SV 2012
Opersys inc.
 
PPTX
Get an Android tutorial for beginners
JavaTpoint.Com
 
PDF
Android Programming
Pasi Manninen
 
PPT
PPT Companion to Android
Dharani Kumar Madduri
 
ODP
Intro To Android App Development
Mike Kvintus
 
PDF
Android - From Zero to Hero @ DEVit 2017
Ivo Neskovic
 
PDF
Android tutorial
master760
 
PPT
Android development tutorial
nazzf
 
PPTX
Android terminologies
jerry vasoya
 
PDF
Android Programming Basics
Eueung Mulyana
 
PPTX
Introduction to Android and Android Studio
Suyash Srijan
 
DOCX
Android architecture
Hari Krishna
 
ZIP
Android Application Development
Benny Skogberg
 
PPTX
Android Programming Seminar
Nhat Nguyen
 
PDF
Android development basics
Pramesh Gautam
 
PPTX
Android Programming made easy
Lars Vogel
 
PDF
Android development - the basics, MFF UK, 2014
Tomáš Kypta
 
ODP
Android basics
Berglind Ósk Bergsdóttir
 
PPTX
All about Android app development -Texavi presentation
Texavi Innovative Solutions
 
Arduino - Android Workshop Presentation
Hem Shrestha
 
Android App Development Intro at ESC SV 2012
Opersys inc.
 
Get an Android tutorial for beginners
JavaTpoint.Com
 
Android Programming
Pasi Manninen
 
PPT Companion to Android
Dharani Kumar Madduri
 
Intro To Android App Development
Mike Kvintus
 
Android - From Zero to Hero @ DEVit 2017
Ivo Neskovic
 
Android tutorial
master760
 
Android development tutorial
nazzf
 
Android terminologies
jerry vasoya
 
Android Programming Basics
Eueung Mulyana
 
Introduction to Android and Android Studio
Suyash Srijan
 
Android architecture
Hari Krishna
 
Android Application Development
Benny Skogberg
 
Android Programming Seminar
Nhat Nguyen
 
Android development basics
Pramesh Gautam
 
Android Programming made easy
Lars Vogel
 
Android development - the basics, MFF UK, 2014
Tomáš Kypta
 
All about Android app development -Texavi presentation
Texavi Innovative Solutions
 

Similar to Introduction to Android Development Part 1 (20)

PPT
introductiontoandroiddevelopment (2).ppt
NagarajKalligudd1
 
DOC
Google android white paper
Sravan Reddy
 
PPTX
Introduction to Android (before 2015)
Chien-Ming Chou
 
PDF
First Steps with Android - An Exciting Introduction
Cesar Augusto Nogueira
 
PDF
Android Workshop_1
Purvik Rana
 
PPTX
Android
Nirav Ranpara
 
PPTX
Android Basic
Nirav Ranpara
 
PPTX
Android workshop
SubashiniRathinavel
 
PPTX
Android beginners David
Arun David Johnson R
 
PPTX
Seminar on android app development
AbhishekKumar4779
 
PPTX
Android development-tutorial
ilias ahmed
 
PDF
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
DuckMa
 
PPTX
Basic of Android App Development
Abhijeet Gupta
 
PDF
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
DuckMa
 
PPTX
Android quick talk
SenthilKumar Selvaraj
 
PPTX
architecture of android.pptx
allurestore
 
DOCX
Android Tutorial For Beginners Part-1
Amit Saxena
 
PPT
Chapter 1 Introduction to android.ppt pl
ENBAKOMZAWUGA
 
PPTX
Android Technology
Anshul Sharma
 
PPTX
Introduction to android app development
cncwebworld
 
introductiontoandroiddevelopment (2).ppt
NagarajKalligudd1
 
Google android white paper
Sravan Reddy
 
Introduction to Android (before 2015)
Chien-Ming Chou
 
First Steps with Android - An Exciting Introduction
Cesar Augusto Nogueira
 
Android Workshop_1
Purvik Rana
 
Android
Nirav Ranpara
 
Android Basic
Nirav Ranpara
 
Android workshop
SubashiniRathinavel
 
Android beginners David
Arun David Johnson R
 
Seminar on android app development
AbhishekKumar4779
 
Android development-tutorial
ilias ahmed
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
DuckMa
 
Basic of Android App Development
Abhijeet Gupta
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
DuckMa
 
Android quick talk
SenthilKumar Selvaraj
 
architecture of android.pptx
allurestore
 
Android Tutorial For Beginners Part-1
Amit Saxena
 
Chapter 1 Introduction to android.ppt pl
ENBAKOMZAWUGA
 
Android Technology
Anshul Sharma
 
Introduction to android app development
cncwebworld
 
Ad

Recently uploaded (20)

PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Biography of Daniel Podor.pdf
Daniel Podor
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Ad

Introduction to Android Development Part 1

  • 2. What is Android?  Android is an open source and Linux-based operating system for mobile devices such as smartphones and tablet computers. Android was developed by the Open Handset Alliance, led by Google, and other companies.  It is not just another operating system for high-end mobile phones….  It is a software platform, rather than just an OS, that has the potential to be utilized in a much wider range of devices.  Android is an application framework on top of Linux, which facilitates its rapid deployment in many domains.
  • 3. History  October 2003 - Android Inc. founded by Andy Rubin, Rich Miner, Nick Sears and Chris White  August 2005 - Google acquired Android Inc.  November 2007 - Open Handset Alliance (OHA) formed  September 2008 - Android 1.0 released  April 2009 – Android 1.5 (Cup Cake)  October 2006 - Android 2.0 (Eclair)  May 2010 – Android 2.2 (Froyo)  Dec 2010 – Android 2.3 (Gingerbread)  Feb 2011 – Android 3.0 (HoneyComb)  October 2011 – Android 4.0 (Ice Cream Sandwich)  July 2012 – Android 4.1, 4.2 (Jelly Bean) to date
  • 5. 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
  • 6. Dalvik Virtual Machine  This is not strictly a Java virtual machine.  It was designed specifically for Android and is optimized in two key ways.  Designed to be instantiated multiple times – each application has its own private copy running in a Linux process.  Also designed to be very memory efficient, being register based (instead of being stack based like most Java VMs) and using its own bytecode implementation.  The Dalvik VM makes full use of Linux for memory management and multi- threading, which is intrinsic in the Java language.  Android applications are commonly implemented in Java utilizing the Dalvik VM.  Accommodates interoperability which results in application portability, e.g. the message sending capability of the SMS application can be used by another application to send text messages.
  • 7. Android distribution channels…  The main distribution channel is Google Play (previously called Android Market),  App Geyser - Alternative free distribution channel  Lots of other third party sites that offer direct download of the android APK.  Apktop.com
  • 8. Development Environment  Full Java IDEs - Eclipse, IntelliJ, Netbeans and recently Android Studio  Plugins and a download of the Google Android SDK are required for all the above IDEs except for Android Studio which comes in-built.  Graphical UI Builders - IDEs also provide GUI Builder for drag and drop functionality  Develop on Virtual Devices - You can specify your target configuration by specifying an Android Virtual Device (AVD) during development  Develop on Hardware Devices – Execute code on either the host-based emulator or a real device, which is normally connected via USB.  Powerful Debugging - Full Java debugger with on-device debugging and Android-specific tools.
  • 9. Programming Model  An Android application consists of a number of resources which are bundled into an archive – an Android package.  Programs are generally written in Java, built using the standard Java tools, and then the output file is processed to generate specific code for the Dalvik VM.  An application is a set of components which are instantiated and run as required. There is not really an entry point or main() function.  There are four types of application component: activities, services, broadcast receivers, and content providers
  • 10. An Activity…  A functional unit of the application, which may be invoked by another activity.  It has a user interface of some form.  An application may incorporate a number of activities.  One activity may be nominated as the default which means that it may be directly executed by the user.
  • 11. A Service…  Similar to an activity, except that it runs in the background  Runs without a UI.  An example of a service might be a media player that plays music while the user performs other tasks.
  • 12. Broadcast Receivers…  Responds to a broadcast messages from other applications or from the system.  For example, it may be useful for the application to know when a picture has been taken. This is the kind of event that may result in a broadcast message.
  • 13. Content Provider  Supplies data from one application to others on request.  Requests are handled by the methods of the ContentResolver class.  The data may be stored in the file system, the database or somewhere else entirely.
  • 15. Application Lifecycle details…  Resumed – The activity is in the foreground and the user can interact with it. (Also sometimes referred to as the "running" state.)  Paused – The activity is partially obscured by another activity—the other activity that's in the foreground is semi-transparent or doesn't cover the entire screen. It does not receive user input and cannot execute any code.  Stopped - The activity is completely hidden and not visible to the user; it is considered to be in the background. While stopped, the activity instance and all its state information such as member variables is retained, but it cannot execute any code.  The other states (Created and Started) are transient and the system quickly moves from them to the next state by calling the next lifecycle callback method. That is, after the system calls onCreate(), it quickly calls onStart(), which is quickly followed by onResume().
  • 17. Physical Project Structure in Eclipse…  /SRC  The src folder contains the Java source code files of your application organized into packages  /GEN  Automatically generated files by the ADT. Here the R.java file contains reference/index to all the resources in the res we use in our program.  /ASSETS  The assets folder is used to store raw asset files. You can keep any raw data in the assets folder and there’s an asset manager in Android to read the data stored in the folder. The raw data can be anything such as audio, video, images etc.
  • 18. Physical Project Structure in Eclipse…  /BIN  /bin folder is where our compiled application files go. When we successfully compile an application, this folder will contain java class files, dex files which are executable under Dalvik virtual machine, apk archives etc.  /RES  /res folder is where we store all our external resources for our applications such as images, layout XML files, strings, animations, audio files etc.  /res/drawable - This folder contains the bitmap file to be used in the program  /res/layout - XML files that defines the User Interface goes in this folder.  /res/values - XML files that define simple values such as strings, arrays, integers, dimensions, colors, styles etc. are placed in this folder.  /res/menu - XML files that define menus in your application goes in this folder
  • 19. AndroidManifest.xml  One of the most important file in the Android project structure. It contains all the information about your application.  When an application is launched, the first file the system seeks is the AndroidManifest.xml file. It actually works as a road map of your application, for the system  The Android Manifest file contains information about:  Components of your application such as Activities, services etc.  User permissions required  Minimum level of Android API required
  • 20. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest . . . > <application . . . > <activity android:name="co.za.momentum.ibrs.MyActivity" ... > </activity> . . . </application> </manifest>
  • 21. AndroidManifest.xml <application . . . > <activity android:name="com.example.project.MyActivity" ... > <intent-filter . . . > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> . . . </application>
  • 22. Demo and Question and Answers