SlideShare una empresa de Scribd logo
1 de 35
ECS 152B
• Yichuan Wang

• yicwang@ucdavis.edu

• Possible project: p2p+android+voip+soft
  handoff
Java
• Basic Java programming
  – Exceptions
  – Inner Class, Interface
• Advanced topics we will touch:
  – Java IO
  – Java Thread
  – Java Socket
• pages.cs.wisc.edu/~hasti/cs368/JavaTutor
  ial/
Android Basics

Credit goes to Google and
          UMBC
Agenda
•   Mobile Application Development (MAD)
•   Intro to Android platform
•   Platform architecture
•   Application building blocks
•   Development tools
•   Hello Android
Few reasons to go MAD…

• Smart Phones
  – Internet access anywhere
  – Social networking
• Millions of mobile users
• Open standards
Introduction to Android
• Open software platform for mobile
  development
• A complete stack – OS, Middleware,
  Applications
• An Open Handset Alliance (OHA) project
• Powered by Linux operating system
• Fast application development in Java
• Open source under the Apache 2 license
Linux Kernel
•   Works as a HAL
•   Device drivers
•   Memory management
•   Process management
•   Networking
Libraries
•   C/C++ libraries
•   Interface through Java
•   Surface manager – Handling UI Windows
•   2D and 3D graphics
•   Media codecs, SQLite, Browser engine
Android Runtime
• Dalvik VM
  – Dex files
  – Compact and efficient than class files
  – Limited memory and battery power
• Core Libraries
  – Java 5 Std edition
  – Collections, I/O etc…
Application Framework



• API interface
• Activity manager – manages application
  life cycle.
Applications


• Built in and user apps
• Can replace built in apps
Agenda
•   Mobile Application Development (MAD)
•   Intro to Android platform
•   Platform architecture
•   Application building blocks
•   Development tools
•   Hello Android
Application Building Blocks
•   Activity
•   IntentReceiver
•   Service
•   ContentProvider
Activities
• Typically correspond to one UI screen
• But, they can:
  – Be faceless
  – Be in a floating window
  – Return a value
IntentReceivers
• Components that respond to broadcast
  ‘Intents’
• Way to respond to external notification or
  alarms
• Apps can invent and broadcast their own
  Intent
Intents
• Think of Intents as a verb and object; a
  description of what you want done
  – E.g. VIEW, CALL, PLAY etc..
• System matches Intent with Activity that
  can best provide the service
• Activities and IntentReceivers describe
  what Intents they can service
Intents
 Home

                                      Picasa
                                       Photo
                                      Gallery
Contacts

           “Pick photo”
 GMail

                 Client component makes a
                  System picks best
 Chat
                 request for a specific use
                  New components can
                  component for that action
                 action functionality
                  existing
Blogger
Blogger
Services
• Faceless components that run in the
  background
  – E.g. music player, network download etc…
ContentProviders
• Enables sharing of data across
  applications
  – E.g. address book, photo gallery
• Provides uniform APIs for:
  – querying
  – delete, update and insert.
• Content is represented by URI and MIME
  type
Agenda
•   Mobile Application Development (MAD)
•   Intro to Android platform
•   Platform architecture
•   Application building blocks
•   Development tools
•   Hello Android
Development Tools

• Eclipse

• Android SDK 1.0-2.0
  developer.android.com
The Emulator

 • QEMU-based ARM emulator
 • Runs the same image as the
   device

 • Limitations:
   – No Camera support
Devices
Hello World
• http://developer.android.com/guide/tutorial
  s/hello-world.html
• Generating UIs
  – Views – building blocks
  – E.g. TextView, EditText, Button
  – Placed into Layouts
  – E.g. LinearLayout, TableLayout,
    AbsoluteLayout
Application Lifecycle
• Application run in their own processes
  (VM, PID)
• Processes are started and stopped as
  needed to run an application's
  components
• Processes may be killed to reclaim
  resources
Lifecycle
• System    • Home   • Mail   • Browser
  Process

  Home

                     • Map
 Contacts



  GMail
Location Manager
XMPP Services
• Allows any app to send device-to-device
  messages to other android users
• Data Messages are Intents with
  name/value pairs
• Works with any gmail account…
• Can also build servers to deliver server-to-
  device messages
Notification Manager
Notification Manager
• How background app interact with users

• Consistent notification presentation
Views
Views
Location Manager

Más contenido relacionado

La actualidad más candente

Android Training - Part 2
Android Training - Part 2Android Training - Part 2
Android Training - Part 2Tbldevelopment
 
Android General information
Android General informationAndroid General information
Android General informationPrashant Gosai
 
Ipsa cool maps 5
Ipsa cool maps 5Ipsa cool maps 5
Ipsa cool maps 5rgcone
 
Android enterprise application development
Android enterprise application developmentAndroid enterprise application development
Android enterprise application developmentParamvir Singh
 
Cross-Platform Mobile Development - Technical Stuff
Cross-Platform Mobile Development - Technical StuffCross-Platform Mobile Development - Technical Stuff
Cross-Platform Mobile Development - Technical StuffAkash Kubavat
 
Mutlimedia authoring tools
Mutlimedia authoring toolsMutlimedia authoring tools
Mutlimedia authoring toolsJay Patel
 
Synapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationSynapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationsaritasingh19866
 
UXT Chicago - Designing Mobile Apps for Enterprise Use
UXT Chicago - Designing Mobile Apps for Enterprise UseUXT Chicago - Designing Mobile Apps for Enterprise Use
UXT Chicago - Designing Mobile Apps for Enterprise UseJeff Steffgen
 
C maksymchuk android
C maksymchuk androidC maksymchuk android
C maksymchuk androidsdeconf
 
Multimedia authoring tools and User interface design
Multimedia authoring tools and User interface designMultimedia authoring tools and User interface design
Multimedia authoring tools and User interface designSagar Rai
 

La actualidad más candente (20)

Android Training - Part 2
Android Training - Part 2Android Training - Part 2
Android Training - Part 2
 
Google android os
Google android osGoogle android os
Google android os
 
Getting started
Getting startedGetting started
Getting started
 
Android General information
Android General informationAndroid General information
Android General information
 
Google android os
Google android osGoogle android os
Google android os
 
Ipsa cool maps 5
Ipsa cool maps 5Ipsa cool maps 5
Ipsa cool maps 5
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Android enterprise application development
Android enterprise application developmentAndroid enterprise application development
Android enterprise application development
 
Cross-Platform Mobile Development - Technical Stuff
Cross-Platform Mobile Development - Technical StuffCross-Platform Mobile Development - Technical Stuff
Cross-Platform Mobile Development - Technical Stuff
 
android
androidandroid
android
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Mutlimedia authoring tools
Mutlimedia authoring toolsMutlimedia authoring tools
Mutlimedia authoring tools
 
Synapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationSynapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile application
 
authoring tools 2015
authoring tools 2015authoring tools 2015
authoring tools 2015
 
UXT Chicago - Designing Mobile Apps for Enterprise Use
UXT Chicago - Designing Mobile Apps for Enterprise UseUXT Chicago - Designing Mobile Apps for Enterprise Use
UXT Chicago - Designing Mobile Apps for Enterprise Use
 
Twitter
TwitterTwitter
Twitter
 
Extensions
ExtensionsExtensions
Extensions
 
C maksymchuk android
C maksymchuk androidC maksymchuk android
C maksymchuk android
 
Multimedia authoring tools and User interface design
Multimedia authoring tools and User interface designMultimedia authoring tools and User interface design
Multimedia authoring tools and User interface design
 
Unified logging on iOS
Unified logging on iOSUnified logging on iOS
Unified logging on iOS
 

Destacado (8)

Gr 2 current focus on is use
Gr 2   current focus on is useGr 2   current focus on is use
Gr 2 current focus on is use
 
Industrie 4.0: Impulsvortrag beim Wirtschaftsrat Deutschland 2014
Industrie 4.0: Impulsvortrag beim Wirtschaftsrat Deutschland 2014Industrie 4.0: Impulsvortrag beim Wirtschaftsrat Deutschland 2014
Industrie 4.0: Impulsvortrag beim Wirtschaftsrat Deutschland 2014
 
Archivo primer bimestre
Archivo primer bimestreArchivo primer bimestre
Archivo primer bimestre
 
Envoi de colis en estonie
Envoi de colis en estonieEnvoi de colis en estonie
Envoi de colis en estonie
 
Cronograma de jornadas de participación ciudadana urbana. Mayo 2013.
Cronograma de jornadas de participación ciudadana urbana. Mayo 2013.Cronograma de jornadas de participación ciudadana urbana. Mayo 2013.
Cronograma de jornadas de participación ciudadana urbana. Mayo 2013.
 
Primeros Auxilios
Primeros Auxilios Primeros Auxilios
Primeros Auxilios
 
TIP 25 Domestic Violence
TIP 25 Domestic ViolenceTIP 25 Domestic Violence
TIP 25 Domestic Violence
 
Trabajo I Epidemiology Genétic PhD versión XIII
Trabajo I Epidemiology Genétic PhD versión XIIITrabajo I Epidemiology Genétic PhD versión XIII
Trabajo I Epidemiology Genétic PhD versión XIII
 

Similar a Introduction to android

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 Application Development.pdf
Android Application Development.pdfAndroid Application Development.pdf
Android Application Development.pdfMohammedMuzammil99
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.pptSumanKumarDey5
 
Android Application Development (2).ppt
Android Application Development (2).pptAndroid Application Development (2).ppt
Android Application Development (2).pptRKRahulKhatri
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.pptSumanKumarDey5
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.pptSarikaDontha1
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.pptSHUBHAMKENDRE5
 
Android application development
Android application developmentAndroid application development
Android application developmentMadhuprakashR1
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.pptTarunSharma506177
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.pptAyushThakur97
 
Synapseindia android apps application development
Synapseindia android apps application developmentSynapseindia android apps application development
Synapseindia android apps application developmentSynapseindiappsdevelopment
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentCan Elmas
 
Android application development
Android application developmentAndroid application development
Android application developmentLinh Vi Tường
 
Android application development
Android application developmentAndroid application development
Android application developmentDarshan Gohel
 
Android development
Android developmentAndroid development
Android developmentmkpartners
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxdebasish duarah
 

Similar a Introduction to android (20)

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
 
265.ppt
265.ppt265.ppt
265.ppt
 
Android Application Development.pdf
Android Application Development.pdfAndroid Application Development.pdf
Android Application Development.pdf
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android Application Development (2).ppt
Android Application Development (2).pptAndroid Application Development (2).ppt
Android Application Development (2).ppt
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Synapseindia android apps application development
Synapseindia android apps application developmentSynapseindia android apps application development
Synapseindia android apps application development
 
Android Training
Android TrainingAndroid Training
Android Training
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
My androidpresentation
My androidpresentationMy androidpresentation
My androidpresentation
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android development
Android developmentAndroid development
Android development
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptx
 

Último

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Introduction to android

  • 1. ECS 152B • Yichuan Wang • yicwang@ucdavis.edu • Possible project: p2p+android+voip+soft handoff
  • 2. Java • Basic Java programming – Exceptions – Inner Class, Interface • Advanced topics we will touch: – Java IO – Java Thread – Java Socket • pages.cs.wisc.edu/~hasti/cs368/JavaTutor ial/
  • 3. Android Basics Credit goes to Google and UMBC
  • 4. Agenda • Mobile Application Development (MAD) • Intro to Android platform • Platform architecture • Application building blocks • Development tools • Hello Android
  • 5. Few reasons to go MAD… • Smart Phones – Internet access anywhere – Social networking • Millions of mobile users • Open standards
  • 6. Introduction to Android • Open software platform for mobile development • A complete stack – OS, Middleware, Applications • An Open Handset Alliance (OHA) project • Powered by Linux operating system • Fast application development in Java • Open source under the Apache 2 license
  • 7.
  • 8. Linux Kernel • Works as a HAL • Device drivers • Memory management • Process management • Networking
  • 9. Libraries • C/C++ libraries • Interface through Java • Surface manager – Handling UI Windows • 2D and 3D graphics • Media codecs, SQLite, Browser engine
  • 10. Android Runtime • Dalvik VM – Dex files – Compact and efficient than class files – Limited memory and battery power • Core Libraries – Java 5 Std edition – Collections, I/O etc…
  • 11. Application Framework • API interface • Activity manager – manages application life cycle.
  • 12. Applications • Built in and user apps • Can replace built in apps
  • 13. Agenda • Mobile Application Development (MAD) • Intro to Android platform • Platform architecture • Application building blocks • Development tools • Hello Android
  • 14. Application Building Blocks • Activity • IntentReceiver • Service • ContentProvider
  • 15. Activities • Typically correspond to one UI screen • But, they can: – Be faceless – Be in a floating window – Return a value
  • 16. IntentReceivers • Components that respond to broadcast ‘Intents’ • Way to respond to external notification or alarms • Apps can invent and broadcast their own Intent
  • 17. Intents • Think of Intents as a verb and object; a description of what you want done – E.g. VIEW, CALL, PLAY etc.. • System matches Intent with Activity that can best provide the service • Activities and IntentReceivers describe what Intents they can service
  • 18. Intents Home Picasa Photo Gallery Contacts “Pick photo” GMail Client component makes a System picks best Chat request for a specific use New components can component for that action action functionality existing Blogger Blogger
  • 19. Services • Faceless components that run in the background – E.g. music player, network download etc…
  • 20. ContentProviders • Enables sharing of data across applications – E.g. address book, photo gallery • Provides uniform APIs for: – querying – delete, update and insert. • Content is represented by URI and MIME type
  • 21. Agenda • Mobile Application Development (MAD) • Intro to Android platform • Platform architecture • Application building blocks • Development tools • Hello Android
  • 22. Development Tools • Eclipse • Android SDK 1.0-2.0 developer.android.com
  • 23. The Emulator • QEMU-based ARM emulator • Runs the same image as the device • Limitations: – No Camera support
  • 25. Hello World • http://developer.android.com/guide/tutorial s/hello-world.html • Generating UIs – Views – building blocks – E.g. TextView, EditText, Button – Placed into Layouts – E.g. LinearLayout, TableLayout, AbsoluteLayout
  • 26. Application Lifecycle • Application run in their own processes (VM, PID) • Processes are started and stopped as needed to run an application's components • Processes may be killed to reclaim resources
  • 27.
  • 28. Lifecycle • System • Home • Mail • Browser Process Home • Map Contacts GMail
  • 30. XMPP Services • Allows any app to send device-to-device messages to other android users • Data Messages are Intents with name/value pairs • Works with any gmail account… • Can also build servers to deliver server-to- device messages
  • 32. Notification Manager • How background app interact with users • Consistent notification presentation
  • 33. Views
  • 34. Views