SlideShare a Scribd company logo
Android Development
      - the basics


    Tomáš Kypta
      @TomasKypta
Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012
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
Android development - the basics, FI MUNI, 2012
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
Android development - the basics, FI MUNI, 2012
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

More Related Content

PDF
Android development - the basics, MFF UK, 2012
Tomáš Kypta
 
PDF
Android development - the basics, MFF UK, 2013
Tomáš Kypta
 
PDF
Android development - the basics, MFF UK, 2014
Tomáš Kypta
 
PDF
LibGDX: Cross Platform Game Development
Intel® Software
 
PDF
Embedded Android Workshop
Opersys inc.
 
PDF
Android jumpstart at ESC Boston 2011
Opersys inc.
 
PDF
Leveraging Android's Linux Heritage at Android Open 2011
Opersys inc.
 
PDF
Creative Inbound Marketing - Adways Labs Thailand Co., Ltd.
Banyapon Poolsawas
 
Android development - the basics, MFF UK, 2012
Tomáš Kypta
 
Android development - the basics, MFF UK, 2013
Tomáš Kypta
 
Android development - the basics, MFF UK, 2014
Tomáš Kypta
 
LibGDX: Cross Platform Game Development
Intel® Software
 
Embedded Android Workshop
Opersys inc.
 
Android jumpstart at ESC Boston 2011
Opersys inc.
 
Leveraging Android's Linux Heritage at Android Open 2011
Opersys inc.
 
Creative Inbound Marketing - Adways Labs Thailand Co., Ltd.
Banyapon Poolsawas
 

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

PDF
Android Jump Start
ConFoo
 
PDF
Android development
Parinda Rajapaksha
 
PDF
Begining Android Development
Hayi Nukman
 
PDF
Android Development...The 20,000-Foot View
CommonsWare
 
PDF
Programming for non tech entrepreneurs
Rodrigo Gil
 
PPTX
Node.js Web Apps @ ebay scale
Dmytro Semenov
 
PPT
Introduction to Android Development
Can Elmas
 
PDF
Introduction to Android Development and Security
Kelwin Yang
 
PPTX
Android quick talk
SenthilKumar Selvaraj
 
PPTX
Introduction to Android (before 2015)
Chien-Ming Chou
 
PPT
Synapseindia android apps overview
Synapseindiappsdevelopment
 
PDF
Day1 before getting_started
Ahsanul Karim
 
ODP
Android App Development - 01 Introduction
Diego Grancini
 
PPTX
Android Lollipop: The developer's perspective
Sebastian Vieira
 
PDF
Android workshop material
Reza Yogaswara
 
PDF
Android Development in a Nutshell
Aleix Solé
 
PDF
Codebits Talk
drjuniornet
 
PDF
Android : Deep dive into developing MobileApp using Android
Emertxe Information Technologies Pvt Ltd
 
PDF
Embedded Android : System Development - Part I
Emertxe Information Technologies Pvt Ltd
 
ODP
Bazillion New Technologies
Ayman Mahfouz
 
Android Jump Start
ConFoo
 
Android development
Parinda Rajapaksha
 
Begining Android Development
Hayi Nukman
 
Android Development...The 20,000-Foot View
CommonsWare
 
Programming for non tech entrepreneurs
Rodrigo Gil
 
Node.js Web Apps @ ebay scale
Dmytro Semenov
 
Introduction to Android Development
Can Elmas
 
Introduction to Android Development and Security
Kelwin Yang
 
Android quick talk
SenthilKumar Selvaraj
 
Introduction to Android (before 2015)
Chien-Ming Chou
 
Synapseindia android apps overview
Synapseindiappsdevelopment
 
Day1 before getting_started
Ahsanul Karim
 
Android App Development - 01 Introduction
Diego Grancini
 
Android Lollipop: The developer's perspective
Sebastian Vieira
 
Android workshop material
Reza Yogaswara
 
Android Development in a Nutshell
Aleix Solé
 
Codebits Talk
drjuniornet
 
Android : Deep dive into developing MobileApp using Android
Emertxe Information Technologies Pvt Ltd
 
Embedded Android : System Development - Part I
Emertxe Information Technologies Pvt Ltd
 
Bazillion New Technologies
Ayman Mahfouz
 
Ad

More from Tomáš Kypta (18)

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

Recently uploaded (20)

PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Software Development Methodologies in 2025
KodekX
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Doc9.....................................
SofiaCollazos
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 

Android development - the basics, FI MUNI, 2012

  • 1. Android Development - the basics Tomáš Kypta @TomasKypta
  • 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
  • 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
  • 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