SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
Android Development
      - the basics


    Tomáš Kypta
      @TomasKypta
Outline
●   Android platform
●   Android ecosystem
●   Android SDK and development tools
●   Hello World
●   Building blocks & the manifest file
●   Activities, widgets, intents
●   Dialog, toast
Android platform
●   Linux-based operating system
●   open-source
●   originally phone OS
●   tablet (since Honeycomb)
●   Google TV
●   hundreds of devices
History
●   2003, Android inc.
●   2005 acquired by Google
●   2008 first Android phone – T-Mobile G1

●   since then rapid development of the platform
Android ecosystem
●   the world's most popular mobile platform
●   over 850 000 new devices activated each day
●   total number of devices ~ 300 million

●   play.google.com (market.android.com)
●   more than 450 000 applications
●   ~ 70% free apps
Problems
●   fragmentation
●   manufacturer/carrier enhancements
●   updates & support
●   openness – low quality apps
●   malware (users)
Sources
●   developer.android.com
●   android-developers.blogspot.com
●   source.android.com
●   stackoverflow.com
●   youtube.com/androiddevelopers
●   svetandroida.cz
Development
●   programming in “Java”
●   native apps possible (C++)

●   development tools platform friendly
●   Windows, Linux, Mac OS X
●   IDE support – ADT plugin for Eclipse,
    Netbeans, IntelliJ IDEA, ...
Android SDK
●   android – Android SDK and AVD Manager
●   adb – Android Debug Bridge
●   ddms – Dalvik Debug Monitor
●   emulator
●   hierarchyviewer
●   ProGuard
●   Traceview
●   docs
Libraries
●   compatibility libraries
●   licensing library

●   AdMob
●   Google Analytics, Flurry
●   C2DM
Android internals
Hello World
Android Building Blocks
●   Activity
●   Service
●   Content provider
●   Broadcast receiver

●   AndroidManifest.xml
Activity
●   screen with user interface
●   the only visual component

●   examples:
        –   list of emails
        –   email detail
        –   email composition
Service
●   runs in background
●   long-running tasks

●   examples:
       –   music playback service
       –   download service
       –   sync service
Content Provider
●   manages and shares application data
●   data storage doesn't matter – database, web,
    filesystem
●   apps can query and modify data through
    content provider
●   read/write permissions can be defined
●   examples:
       –   all system databases
       –   contacts
       –   SMS
Broadcast Receiver
●   responds to broadcasts
●   broadcasts are system wide
●   can be registered statically or dynamically
●   system or custom messages
●   examples:
        –   incoming SMS, incoming call
        –   screen turned off
        –   low baterry
        –   removed SD card
AndroidManifest.xml
●   defines what parts the app have
●   defines which endpoints are exposed
●   minimum API level
●   permissions
●   declare hardware and software features
●   required configuration
Intent
●   asynchronous message
●   binds components together (all of them
    except ContentProvider)
●   starting activities
●   starting services and binding to services
●   sending broadcasts
User Interface
●   defined by hierarchy of views
●   layouts = containers
       –   LinearLayout
       –   RelativeLayout
       –   FrameLayout
●   widgets = UI objects
       –   Button, TextView, EditText
       –   WebView
Activity Lifecycle
●   activities managed in a stack
●   activity can be in different states during it's
    lifecycle:
        –   foreground
        –   visible
        –   stopped
        –   killed
Intent & Activity
●   starting activity explicitly

●   starting activity implicitly



●   starting activity for result
List Widgets
●   displays a list of items (some view)
        –   ListView, Spinner, GridView, Gallery
●   use adapter to bind list to data
Dialogs and Toasts
●   Dialog – displays modal information
       –   standard dialogs
       –   custom dialogs
●   Toast – non-modal information
       –   doesn't have user focus
THE END

Más contenido relacionado

Similar a Android development - the basics, FI MUNI, 2012

Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump Start
ConFoo
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
Rodrigo Gil
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
Aleix Solé
 

Similar a Android development - the basics, FI MUNI, 2012 (20)

Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump Start
 
Android development
Android developmentAndroid development
Android development
 
Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android Development
 
Android Development...The 20,000-Foot View
Android Development...The 20,000-Foot ViewAndroid Development...The 20,000-Foot View
Android Development...The 20,000-Foot View
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
Introduction to Android (before 2015)
Introduction to Android (before 2015)Introduction to Android (before 2015)
Introduction to Android (before 2015)
 
Synapseindia android apps overview
Synapseindia android apps overviewSynapseindia android apps overview
Synapseindia android apps overview
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_started
 
Android App Development - 01 Introduction
Android App Development - 01 IntroductionAndroid App Development - 01 Introduction
Android App Development - 01 Introduction
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspective
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop material
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
 
Codebits Talk
Codebits TalkCodebits Talk
Codebits Talk
 
Android : Deep dive into developing MobileApp using Android
Android : Deep dive into developing MobileApp using AndroidAndroid : Deep dive into developing MobileApp using Android
Android : Deep dive into developing MobileApp using Android
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Bazillion New Technologies
Bazillion New TechnologiesBazillion New Technologies
Bazillion New Technologies
 

Más de Tomáš Kypta

Más de Tomáš Kypta (18)

Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworks
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworks
 
Practical RxJava for Android
Practical RxJava for AndroidPractical RxJava for Android
Practical RxJava for Android
 
Practical RxJava for Android
Practical RxJava for AndroidPractical RxJava for Android
Practical RxJava for Android
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Android Develpment vol. 3, MFF UK, 2015
Android Develpment vol. 3, MFF UK, 2015Android Develpment vol. 3, MFF UK, 2015
Android Develpment vol. 3, MFF UK, 2015
 
Writing testable Android apps
Writing testable Android appsWriting testable Android apps
Writing testable Android apps
 
Android Develpment vol. 2, MFF UK, 2015
Android Develpment vol. 2, MFF UK, 2015Android Develpment vol. 2, MFF UK, 2015
Android Develpment vol. 2, MFF UK, 2015
 
ProGuard
ProGuardProGuard
ProGuard
 
Unit testing and Android
Unit testing and AndroidUnit testing and Android
Unit testing and Android
 
Android Development for Phone and Tablet
Android Development for Phone and TabletAndroid Development for Phone and Tablet
Android Development for Phone and Tablet
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Android Libraries
Android LibrariesAndroid Libraries
Android Libraries
 
Android Development 201
Android Development 201Android Development 201
Android Development 201
 
Užitečné Android knihovny pro vývoj a testování
Užitečné Android knihovny pro vývoj a testováníUžitečné Android knihovny pro vývoj a testování
Užitečné Android knihovny pro vývoj a testování
 
Programování pro Android - úvod, FI MUNI, 2013
Programování pro Android - úvod, FI MUNI, 2013Programování pro Android - úvod, FI MUNI, 2013
Programování pro Android - úvod, FI MUNI, 2013
 
Stylování ActionBaru
Stylování ActionBaruStylování ActionBaru
Stylování ActionBaru
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
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...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Android development - the basics, FI MUNI, 2012

  • 1. Android Development - the basics Tomáš Kypta @TomasKypta
  • 2.
  • 3.
  • 4. Outline ● Android platform ● Android ecosystem ● Android SDK and development tools ● Hello World ● Building blocks & the manifest file ● Activities, widgets, intents ● Dialog, toast
  • 5. Android platform ● Linux-based operating system ● open-source ● originally phone OS ● tablet (since Honeycomb) ● Google TV ● hundreds of devices
  • 6.
  • 7. History ● 2003, Android inc. ● 2005 acquired by Google ● 2008 first Android phone – T-Mobile G1 ● since then rapid development of the platform
  • 8. Android ecosystem ● the world's most popular mobile platform ● over 850 000 new devices activated each day ● total number of devices ~ 300 million ● play.google.com (market.android.com) ● more than 450 000 applications ● ~ 70% free apps
  • 9. Problems ● fragmentation ● manufacturer/carrier enhancements ● updates & support ● openness – low quality apps ● malware (users)
  • 10. Sources ● developer.android.com ● android-developers.blogspot.com ● source.android.com ● stackoverflow.com ● youtube.com/androiddevelopers ● svetandroida.cz
  • 11. Development ● programming in “Java” ● native apps possible (C++) ● development tools platform friendly ● Windows, Linux, Mac OS X ● IDE support – ADT plugin for Eclipse, Netbeans, IntelliJ IDEA, ...
  • 12. Android SDK ● android – Android SDK and AVD Manager ● adb – Android Debug Bridge ● ddms – Dalvik Debug Monitor ● emulator ● hierarchyviewer ● ProGuard ● Traceview ● docs
  • 13. Libraries ● compatibility libraries ● licensing library ● AdMob ● Google Analytics, Flurry ● C2DM
  • 16. Android Building Blocks ● Activity ● Service ● Content provider ● Broadcast receiver ● AndroidManifest.xml
  • 17. Activity ● screen with user interface ● the only visual component ● examples: – list of emails – email detail – email composition
  • 18. Service ● runs in background ● long-running tasks ● examples: – music playback service – download service – sync service
  • 19. Content Provider ● manages and shares application data ● data storage doesn't matter – database, web, filesystem ● apps can query and modify data through content provider ● read/write permissions can be defined ● examples: – all system databases – contacts – SMS
  • 20. Broadcast Receiver ● responds to broadcasts ● broadcasts are system wide ● can be registered statically or dynamically ● system or custom messages ● examples: – incoming SMS, incoming call – screen turned off – low baterry – removed SD card
  • 21. AndroidManifest.xml ● defines what parts the app have ● defines which endpoints are exposed ● minimum API level ● permissions ● declare hardware and software features ● required configuration
  • 22. Intent ● asynchronous message ● binds components together (all of them except ContentProvider) ● starting activities ● starting services and binding to services ● sending broadcasts
  • 23. User Interface ● defined by hierarchy of views ● layouts = containers – LinearLayout – RelativeLayout – FrameLayout ● widgets = UI objects – Button, TextView, EditText – WebView
  • 24. Activity Lifecycle ● activities managed in a stack ● activity can be in different states during it's lifecycle: – foreground – visible – stopped – killed
  • 25.
  • 26. Intent & Activity ● starting activity explicitly ● starting activity implicitly ● starting activity for result
  • 27. List Widgets ● displays a list of items (some view) – ListView, Spinner, GridView, Gallery ● use adapter to bind list to data
  • 28. Dialogs and Toasts ● Dialog – displays modal information – standard dialogs – custom dialogs ● Toast – non-modal information – doesn't have user focus