SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette (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
 

Similaire à 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.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
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.pptSarikaDontha1
 
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
 

Similaire à 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
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
 
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
 

Dernier

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Dernier (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

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