SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-pptSrijib Roy
 
Arduino - Android Workshop Presentation
Arduino - Android Workshop PresentationArduino - Android Workshop Presentation
Arduino - Android Workshop PresentationHem Shrestha
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Opersys inc.
 
Get an Android tutorial for beginners
Get an Android tutorial for beginnersGet an Android tutorial for beginners
Get an Android tutorial for beginnersJavaTpoint.Com
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App DevelopmentMike Kvintus
 
Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Ivo Neskovic
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialmaster760
 
Android development tutorial
Android development tutorialAndroid development tutorial
Android development tutorialnazzf
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologiesjerry vasoya
 
Android Programming Basics
Android Programming BasicsAndroid Programming Basics
Android Programming BasicsEueung Mulyana
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android StudioSuyash Srijan
 
Android architecture
Android architectureAndroid architecture
Android architectureHari Krishna
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentBenny Skogberg
 
Android Programming Seminar
Android Programming SeminarAndroid Programming Seminar
Android Programming SeminarNhat Nguyen
 
Android development basics
Android development basicsAndroid development basics
Android development basicsPramesh Gautam
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
Android development - the basics, MFF UK, 2014
Android development - the basics, MFF UK, 2014Android development - the basics, MFF UK, 2014
Android development - the basics, MFF UK, 2014Tomáš Kypta
 

Tendances (20)

Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
Arduino - Android Workshop Presentation
Arduino - Android Workshop PresentationArduino - Android Workshop Presentation
Arduino - Android Workshop Presentation
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012
 
Get an Android tutorial for beginners
Get an Android tutorial for beginnersGet an Android tutorial for beginners
Get an Android tutorial for beginners
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
 
Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android development tutorial
Android development tutorialAndroid development tutorial
Android development tutorial
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologies
 
Android Programming Basics
Android Programming BasicsAndroid Programming Basics
Android Programming Basics
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Android Programming Seminar
Android Programming SeminarAndroid Programming Seminar
Android Programming Seminar
 
Android development basics
Android development basicsAndroid development basics
Android development basics
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
Android development - the basics, MFF UK, 2014
Android development - the basics, MFF UK, 2014Android development - the basics, MFF UK, 2014
Android development - the basics, MFF UK, 2014
 
Android basics
Android basicsAndroid basics
Android basics
 

Similaire à Introduction to Android Development Part 1

Google android white paper
Google android white paperGoogle android white paper
Google android white paperSravan Reddy
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architectureDilip Singh
 
First Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting IntroductionFirst Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting IntroductionCesar Augusto Nogueira
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]Yatharth Aggarwal
 
01 what is android
01 what is android01 what is android
01 what is androidC.o. Nieto
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidzeelpatel0504
 
Java talks. Android intoduction for develompment
Java talks. Android intoduction for develompmentJava talks. Android intoduction for develompment
Java talks. Android intoduction for develompmentAlexei Miliutin
 
Android development training programme Day 1
Android development training programme Day 1Android development training programme Day 1
Android development training programme Day 1DHIRAJ PRAVIN
 
Android Development
Android DevelopmentAndroid Development
Android Developmentmclougm4
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, androidJehad2012
 
Android overview
Android overviewAndroid overview
Android overviewHas Taiar
 

Similaire à Introduction to Android Development Part 1 (20)

Google android white paper
Google android white paperGoogle android white paper
Google android white paper
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android platform
Android platform Android platform
Android platform
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
 
First Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting IntroductionFirst Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting Introduction
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]
 
Android beginners David
Android beginners DavidAndroid beginners David
Android beginners David
 
01 what is android
01 what is android01 what is android
01 what is android
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Java talks. Android intoduction for develompment
Java talks. Android intoduction for develompmentJava talks. Android intoduction for develompment
Java talks. Android intoduction for develompment
 
Aptech Apps
Aptech Apps Aptech Apps
Aptech Apps
 
Android development training programme Day 1
Android development training programme Day 1Android development training programme Day 1
Android development training programme Day 1
 
Android my
Android myAndroid my
Android my
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, android
 
Android overview
Android overviewAndroid overview
Android overview
 
Andriod
Andriod Andriod
Andriod
 

Dernier

Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideIEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideHironori Washizaki
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 

Dernier (20)

Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideIEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 

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