SlideShare a Scribd company logo
1 of 33
Download to read offline
Daniel Switkin
Senior Software Engineer, Google Inc.
Android Application Development
Goal
• Get you an idea of how to start developing
Android applications
• Introduce major Android application concepts
• Walk you through a sample application in the
development environment
Agenda
• System architecture
• Hello World!
• Application components
• Practical matters
• Toolchain
What is Android?
• A free, open source mobile platform
• A Linux-based, multiprocess, multithreaded OS
• Android is not a device or a product
• It’s not even limited to phones - you could build
a DVR, a handheld GPS, an MP3 player, etc.
Android Runtime
DalvikVirtual
Machine
Core Libraries
Application Framework
View
System
Content
Providers
Resource
Manager GTalk ServiceLocation
Manager
Activity Manager
Package Manager
Window
Manager
Telephony
Manager
Notification
Manager
Linux Kernel
Display
Driver Camera Driver Bluetooth
Driver
Flash Memory
Driver
Binder (IPC)
Driver
Power
ManagementUSB Driver Keypad Driver WiFi Driver Audio
Drivers
Libraries
FreeType
SGL SSL
SQLite
WebKit
libc
Surface Manager
OpenGL | ES
Media
Framework
Applications
Home PhoneContacts Browser ...
Hello World!
The History of GUIs
• Hardcoded to the screen
• Hardcoded to the window
• Hardcoded within a view hierarchy
• Dynamic layout within a view hierarchy
Generating GUIs
• Two ways to create GUIs: in XML or in code
• Declarative route via XML has advantages
• A lot of your GUI-related work will take place in:
•res/layout
•res/values
•@id/name_for_component gives you
handle for referencing XML declarations in code
Views
• Views are building blocks
• Examples:
• Can be as basic as:TextView, EditText, or
ListView
• Fancier views: ImageView, MapView,WebView
Layouts
• Controls howViews are laid out
• FrameLayout : each child a layer
• LinearLayout : single row or column
• RelativeLayout : relative to otherViews
• TableLayout : rows and columns
• AbsoluteLayout : <x,y> coordinates
Layouts are resizable
480x320
240x320
320x240
Layouts are customizable
res/layout/share.xml res/layout-land/share.xml
Layout Parameters
• Specify many aspects of what’s being rendered
• Examples:
• android:layout_height
• android:layout_width
• Tip: start with documentation for a specificView
or Layout and then look at what’s inherited from
parent class
Application Components
Basic components
Activities
UI component typically
corresponding to one screen.
BroadcastReceivers Respond to broadcast Intents.
Services
Faceless tasks that run in the
background.
ContentProviders Enable applications to share data.
Activities
• Typically correspond to one screen in a UI
• But, they can:
• be faceless
• be in a floating window
• return a value
Intents
• Think of Intents as a verb and object; a
description of what you want done
• Examples: VIEW, CALL, PLAY, etc.
• System matches Intent with Activity that can best
provide that service
• Activities and BroadcastReceivers describe what
Intents they can service in their IntentFilters (via
AndroidManifest.xml)
Intents
GMail
Contacts
Chat
Home
Picasa
Blogger
“Pick photo”
Client component makes a
request for a specific action
System picks best
component for that action
Components can be
replaced any time
New components can use
existing functionality
Photo
Gallery
BroadcastReceivers
• Components designed to respond to broadcast
Intents
• Think of them as a way to respond to external
notifications or alarms
• Applications can invent and broadcast their own
Intents as well
Services
• Faceless components that run in the background
• Example: music player, network downlaod, etc.
• Bind your code to a running service via a
remote-able interface defined in an IDL
• Can run in your own process or separate
process
ContentProviders
• Enables sharing of data across applications
• Examples: address book, photo gallery, etc.
• Provides uniform APIs for:
• querying (returns a Cursor)
• delete, update, and insert rows
• Content is represented by URI and MIME type
Practical matters
Storage and Persistence
• A couple of different options:
• Preferences
• Flat file
• SQLite
• ContentProvider
Packaging
• Think of .apk files as Android packages
• Everything needed for an application is bundled
up therein
• Basically a glorified ZIP file
Resources
• res/layout: declarative layout files
• res/drawable: intended for drawing
• res/anim: bitmaps, animations for transitions
• res/values: externalized values for things like
strings, colors, styles, etc.
• res/xml: general XML files used at runtime
• res/raw: binary files (e.g. sound)
Assets
• Similar to Resources
• Differences:
• Read-only
• InputStream access to assets
• Any kind of file
• Be mindful of file sizes
Application Lifecycle
• Application lifecycle is managed by the system
• Application start/stop is transparent to the user
• End-user only sees that they are moving between
screens
• Read documentation for android.app.Activity
Toolchain
Emulator
• QEMU-based ARM emulator
runs same system image as
a device
• Use same toolchain to work
with devices or emulator
Eclipse Plugin
Project template
Debugging
Call stack
Breakpoints, single stepping
Examine variables
Eclipse demo
Q & A

More Related Content

What's hot

Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right placeContext oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right placeLeonardo Proietti
 
Demo Neo4j - Big Data Paris
Demo Neo4j - Big Data ParisDemo Neo4j - Big Data Paris
Demo Neo4j - Big Data ParisNeo4j
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to AndroidHopeDeveloper
 
Building Maps with Leaflet
Building Maps with LeafletBuilding Maps with Leaflet
Building Maps with LeafletJereme Causing
 
Domain Driven Design Ruby Ways - JURNAL 05/10/2017
Domain Driven Design Ruby Ways -  JURNAL 05/10/2017Domain Driven Design Ruby Ways -  JURNAL 05/10/2017
Domain Driven Design Ruby Ways - JURNAL 05/10/2017Jonathan Wylliem
 
Introduction to C#
Introduction to C#Introduction to C#
Introduction to C#SharePointKE
 
SiriusCon17 - Eclipse Sirius at a glance
SiriusCon17 - Eclipse Sirius at a glanceSiriusCon17 - Eclipse Sirius at a glance
SiriusCon17 - Eclipse Sirius at a glanceObeo
 
Web Development Technologies
Web Development TechnologiesWeb Development Technologies
Web Development TechnologiesVignesh Prajapati
 
Digital Library Cloud Services
Digital Library Cloud ServicesDigital Library Cloud Services
Digital Library Cloud ServicesIIIF_io
 
Android development course in pune ppt.
Android development course in pune ppt.Android development course in pune ppt.
Android development course in pune ppt.sambhajimeher
 
Startup Bootcamp - Intro to NoSQL/Big Data by DataZone
Startup Bootcamp - Intro to NoSQL/Big Data by DataZoneStartup Bootcamp - Intro to NoSQL/Big Data by DataZone
Startup Bootcamp - Intro to NoSQL/Big Data by DataZoneIdan Tohami
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETJoni
 

What's hot (15)

Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right placeContext oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
 
Demo Neo4j - Big Data Paris
Demo Neo4j - Big Data ParisDemo Neo4j - Big Data Paris
Demo Neo4j - Big Data Paris
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
Building Maps with Leaflet
Building Maps with LeafletBuilding Maps with Leaflet
Building Maps with Leaflet
 
Domain Driven Design Ruby Ways - JURNAL 05/10/2017
Domain Driven Design Ruby Ways -  JURNAL 05/10/2017Domain Driven Design Ruby Ways -  JURNAL 05/10/2017
Domain Driven Design Ruby Ways - JURNAL 05/10/2017
 
Introduction to C#
Introduction to C#Introduction to C#
Introduction to C#
 
SiriusCon17 - Eclipse Sirius at a glance
SiriusCon17 - Eclipse Sirius at a glanceSiriusCon17 - Eclipse Sirius at a glance
SiriusCon17 - Eclipse Sirius at a glance
 
Web Development Technologies
Web Development TechnologiesWeb Development Technologies
Web Development Technologies
 
Reversengineering
ReversengineeringReversengineering
Reversengineering
 
Why do I Love C#?
Why do I Love C#?Why do I Love C#?
Why do I Love C#?
 
Digital Library Cloud Services
Digital Library Cloud ServicesDigital Library Cloud Services
Digital Library Cloud Services
 
Android
Android Android
Android
 
Android development course in pune ppt.
Android development course in pune ppt.Android development course in pune ppt.
Android development course in pune ppt.
 
Startup Bootcamp - Intro to NoSQL/Big Data by DataZone
Startup Bootcamp - Intro to NoSQL/Big Data by DataZoneStartup Bootcamp - Intro to NoSQL/Big Data by DataZone
Startup Bootcamp - Intro to NoSQL/Big Data by DataZone
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 

Viewers also liked

Digital brain co_13_print_crystalgraphics.com_powerpoint_templates_trial
Digital brain co_13_print_crystalgraphics.com_powerpoint_templates_trialDigital brain co_13_print_crystalgraphics.com_powerpoint_templates_trial
Digital brain co_13_print_crystalgraphics.com_powerpoint_templates_trialAli Mian
 
Open source mobile development solutions
Open source mobile development solutionsOpen source mobile development solutions
Open source mobile development solutionsDaniel Downs
 
Mobile app development sylhet it academy
Mobile app development  sylhet it academyMobile app development  sylhet it academy
Mobile app development sylhet it academySylhet IT Academy
 
ALI SHAN CV Software-Engineer-Resume
ALI SHAN CV Software-Engineer-ResumeALI SHAN CV Software-Engineer-Resume
ALI SHAN CV Software-Engineer-ResumeALI SHAN
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_startedAhsanul Karim
 
Developing a mobile application curriculum which empowers authentic
Developing a mobile application curriculum which empowers authenticDeveloping a mobile application curriculum which empowers authentic
Developing a mobile application curriculum which empowers authenticDaniel Downs
 
CV IT Support-Software Engineer
CV IT Support-Software EngineerCV IT Support-Software Engineer
CV IT Support-Software EngineerMohd Ahmed
 
Android MapView and MapActivity
Android MapView and MapActivityAndroid MapView and MapActivity
Android MapView and MapActivityAhsanul Karim
 
Artificail Intelligent lec-1
Artificail Intelligent lec-1Artificail Intelligent lec-1
Artificail Intelligent lec-1tjunicornfx
 
Lecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & PreferencesLecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & PreferencesAhsanul Karim
 
Mahmoud Elmasry CV - Senior Software Quality Assurance Engineer
Mahmoud Elmasry CV - Senior Software Quality Assurance EngineerMahmoud Elmasry CV - Senior Software Quality Assurance Engineer
Mahmoud Elmasry CV - Senior Software Quality Assurance EngineerMahmoud Elmasry
 

Viewers also liked (20)

Digital brain co_13_print_crystalgraphics.com_powerpoint_templates_trial
Digital brain co_13_print_crystalgraphics.com_powerpoint_templates_trialDigital brain co_13_print_crystalgraphics.com_powerpoint_templates_trial
Digital brain co_13_print_crystalgraphics.com_powerpoint_templates_trial
 
Open source mobile development solutions
Open source mobile development solutionsOpen source mobile development solutions
Open source mobile development solutions
 
Mobile app development sylhet it academy
Mobile app development  sylhet it academyMobile app development  sylhet it academy
Mobile app development sylhet it academy
 
1 Intro
1 Intro1 Intro
1 Intro
 
ALI SHAN CV Software-Engineer-Resume
ALI SHAN CV Software-Engineer-ResumeALI SHAN CV Software-Engineer-Resume
ALI SHAN CV Software-Engineer-Resume
 
eCertificate
eCertificateeCertificate
eCertificate
 
Android course (lecture2)
Android course (lecture2)Android course (lecture2)
Android course (lecture2)
 
Naveen ResuMeS - Copy (1)
Naveen ResuMeS - Copy (1)Naveen ResuMeS - Copy (1)
Naveen ResuMeS - Copy (1)
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_started
 
Android course (lecture1)
Android course (lecture1)Android course (lecture1)
Android course (lecture1)
 
CV EXAMPLE
CV EXAMPLE CV EXAMPLE
CV EXAMPLE
 
Developing a mobile application curriculum which empowers authentic
Developing a mobile application curriculum which empowers authenticDeveloping a mobile application curriculum which empowers authentic
Developing a mobile application curriculum which empowers authentic
 
CV IT Support-Software Engineer
CV IT Support-Software EngineerCV IT Support-Software Engineer
CV IT Support-Software Engineer
 
Android Basic- CMC
Android Basic- CMCAndroid Basic- CMC
Android Basic- CMC
 
Android MapView and MapActivity
Android MapView and MapActivityAndroid MapView and MapActivity
Android MapView and MapActivity
 
Artificail Intelligent lec-1
Artificail Intelligent lec-1Artificail Intelligent lec-1
Artificail Intelligent lec-1
 
Example Single Page CV
Example Single Page CVExample Single Page CV
Example Single Page CV
 
Lecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & PreferencesLecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & Preferences
 
Client-Server
Client-ServerClient-Server
Client-Server
 
Mahmoud Elmasry CV - Senior Software Quality Assurance Engineer
Mahmoud Elmasry CV - Senior Software Quality Assurance EngineerMahmoud Elmasry CV - Senior Software Quality Assurance Engineer
Mahmoud Elmasry CV - Senior Software Quality Assurance Engineer
 

Similar to Lecture3

Android application development
Android application developmentAndroid application development
Android application developmentLinh Vi Tường
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1Purvik Rana
 
Introduction to Android (before 2015)
Introduction to Android (before 2015)Introduction to Android (before 2015)
Introduction to Android (before 2015)Chien-Ming Chou
 
Consistent UI Across Android Devices
Consistent UI Across Android DevicesConsistent UI Across Android Devices
Consistent UI Across Android DevicesIrene Duke
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to AndroidNitinMehra2205
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidJawad Mohmand
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its FeaturesHarshad Lokhande
 
Synapseindia android apps application development
Synapseindia android apps application developmentSynapseindia android apps application development
Synapseindia android apps application developmentSynapseindiappsdevelopment
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_uDoris Chen
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptxasmeerana605
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013DuckMa
 
Android Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptxAndroid Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptxDCETechnicalClub
 
Android development orientation for starters v2
Android development orientation for starters v2Android development orientation for starters v2
Android development orientation for starters v2Joemarie Amparo
 
Synapse india reviews on android application
Synapse india reviews on android applicationSynapse india reviews on android application
Synapse india reviews on android applicationsaritasingh19866
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsiaMichael Angelo Rivera
 

Similar to Lecture3 (20)

Android application development
Android application developmentAndroid application development
Android application development
 
Androidify workshop
Androidify workshopAndroidify workshop
Androidify workshop
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
 
Introduction to Android (before 2015)
Introduction to Android (before 2015)Introduction to Android (before 2015)
Introduction to Android (before 2015)
 
Consistent UI Across Android Devices
Consistent UI Across Android DevicesConsistent UI Across Android Devices
Consistent UI Across Android Devices
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
 
My androidpresentation
My androidpresentationMy androidpresentation
My androidpresentation
 
Synapseindia android apps application development
Synapseindia android apps application developmentSynapseindia android apps application development
Synapseindia android apps application development
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptx
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
Android Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptxAndroid Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptx
 
Android development orientation for starters v2
Android development orientation for starters v2Android development orientation for starters v2
Android development orientation for starters v2
 
Synapse india reviews on android application
Synapse india reviews on android applicationSynapse india reviews on android application
Synapse india reviews on android application
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsia
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Lecture3

  • 1. Daniel Switkin Senior Software Engineer, Google Inc. Android Application Development
  • 2. Goal • Get you an idea of how to start developing Android applications • Introduce major Android application concepts • Walk you through a sample application in the development environment
  • 3. Agenda • System architecture • Hello World! • Application components • Practical matters • Toolchain
  • 4. What is Android? • A free, open source mobile platform • A Linux-based, multiprocess, multithreaded OS • Android is not a device or a product • It’s not even limited to phones - you could build a DVR, a handheld GPS, an MP3 player, etc.
  • 5. Android Runtime DalvikVirtual Machine Core Libraries Application Framework View System Content Providers Resource Manager GTalk ServiceLocation Manager Activity Manager Package Manager Window Manager Telephony Manager Notification Manager Linux Kernel Display Driver Camera Driver Bluetooth Driver Flash Memory Driver Binder (IPC) Driver Power ManagementUSB Driver Keypad Driver WiFi Driver Audio Drivers Libraries FreeType SGL SSL SQLite WebKit libc Surface Manager OpenGL | ES Media Framework Applications Home PhoneContacts Browser ...
  • 7. The History of GUIs • Hardcoded to the screen • Hardcoded to the window • Hardcoded within a view hierarchy • Dynamic layout within a view hierarchy
  • 8. Generating GUIs • Two ways to create GUIs: in XML or in code • Declarative route via XML has advantages • A lot of your GUI-related work will take place in: •res/layout •res/values •@id/name_for_component gives you handle for referencing XML declarations in code
  • 9. Views • Views are building blocks • Examples: • Can be as basic as:TextView, EditText, or ListView • Fancier views: ImageView, MapView,WebView
  • 10. Layouts • Controls howViews are laid out • FrameLayout : each child a layer • LinearLayout : single row or column • RelativeLayout : relative to otherViews • TableLayout : rows and columns • AbsoluteLayout : <x,y> coordinates
  • 13. Layout Parameters • Specify many aspects of what’s being rendered • Examples: • android:layout_height • android:layout_width • Tip: start with documentation for a specificView or Layout and then look at what’s inherited from parent class
  • 15. Basic components Activities UI component typically corresponding to one screen. BroadcastReceivers Respond to broadcast Intents. Services Faceless tasks that run in the background. ContentProviders Enable applications to share data.
  • 16. Activities • Typically correspond to one screen in a UI • But, they can: • be faceless • be in a floating window • return a value
  • 17. Intents • Think of Intents as a verb and object; a description of what you want done • Examples: VIEW, CALL, PLAY, etc. • System matches Intent with Activity that can best provide that service • Activities and BroadcastReceivers describe what Intents they can service in their IntentFilters (via AndroidManifest.xml)
  • 18. Intents GMail Contacts Chat Home Picasa Blogger “Pick photo” Client component makes a request for a specific action System picks best component for that action Components can be replaced any time New components can use existing functionality Photo Gallery
  • 19. BroadcastReceivers • Components designed to respond to broadcast Intents • Think of them as a way to respond to external notifications or alarms • Applications can invent and broadcast their own Intents as well
  • 20. Services • Faceless components that run in the background • Example: music player, network downlaod, etc. • Bind your code to a running service via a remote-able interface defined in an IDL • Can run in your own process or separate process
  • 21. ContentProviders • Enables sharing of data across applications • Examples: address book, photo gallery, etc. • Provides uniform APIs for: • querying (returns a Cursor) • delete, update, and insert rows • Content is represented by URI and MIME type
  • 23. Storage and Persistence • A couple of different options: • Preferences • Flat file • SQLite • ContentProvider
  • 24. Packaging • Think of .apk files as Android packages • Everything needed for an application is bundled up therein • Basically a glorified ZIP file
  • 25. Resources • res/layout: declarative layout files • res/drawable: intended for drawing • res/anim: bitmaps, animations for transitions • res/values: externalized values for things like strings, colors, styles, etc. • res/xml: general XML files used at runtime • res/raw: binary files (e.g. sound)
  • 26. Assets • Similar to Resources • Differences: • Read-only • InputStream access to assets • Any kind of file • Be mindful of file sizes
  • 27. Application Lifecycle • Application lifecycle is managed by the system • Application start/stop is transparent to the user • End-user only sees that they are moving between screens • Read documentation for android.app.Activity
  • 29. Emulator • QEMU-based ARM emulator runs same system image as a device • Use same toolchain to work with devices or emulator
  • 31. Debugging Call stack Breakpoints, single stepping Examine variables
  • 33. Q & A