Android Development      - the basics    Tomáš Kypta      @TomasKypta
Outline●   Android platform●   Android ecosystem●   Android SDK and development tools●   Hello World●   Building blocks & ...
Android platform●   Linux-based operating system●   open-source●   originally phone OS●   tablet (since Honeycomb)●   Goog...
History●   2003, Android inc.●   2005 acquired by Google●   2008 first Android phone – T-Mobile G1●   since then rapid dev...
Android ecosystem●   the worlds most popular mobile platform●   over 850 000 new devices activated each day●   total numbe...
Problems●   fragmentation●   manufacturer/carrier enhancements●   updates & support●   openness – low quality apps●   malw...
Sources●   developer.android.com●   android-developers.blogspot.com●   source.android.com●   stackoverflow.com●   youtube....
Development●   programming in “Java”●   native apps possible (C++)●   development tools platform friendly●   Windows, Linu...
Android SDK●   android – Android SDK and AVD Manager●   adb – Android Debug Bridge●   ddms – Dalvik Debug Monitor●   emula...
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        –   emai...
Service●   runs in background●   long-running tasks●   examples:       –   music playback service       –   download servi...
Content Provider●   manages and shares application data●   data storage doesnt matter – database, web,    filesystem●   ap...
Broadcast Receiver●   responds to broadcasts●   broadcasts are system wide●   can be registered statically or dynamically●...
AndroidManifest.xml●   defines what parts the app have●   defines which endpoints are exposed●   minimum API level●   perm...
Intent●   asynchronous message●   binds components together (all of them    except ContentProvider)●   starting activities...
User Interface●   defined by hierarchy of views●   layouts = containers       –   LinearLayout       –   RelativeLayout   ...
Activity Lifecycle●   activities managed in a stack●   activity can be in different states during its    lifecycle:       ...
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 bin...
Dialogs and Toasts●   Dialog – displays modal information       –   standard dialogs       –   custom dialogs●   Toast – n...
THE END
Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012
Upcoming SlideShare
Loading in...5
×

Android development - the basics, FI MUNI, 2012

970

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
970
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Android development - the basics, FI MUNI, 2012

  1. 1. Android Development - the basics Tomáš Kypta @TomasKypta
  2. 2. Outline● Android platform● Android ecosystem● Android SDK and development tools● Hello World● Building blocks & the manifest file● Activities, widgets, intents● Dialog, toast
  3. 3. Android platform● Linux-based operating system● open-source● originally phone OS● tablet (since Honeycomb)● Google TV● hundreds of devices
  4. 4. History● 2003, Android inc.● 2005 acquired by Google● 2008 first Android phone – T-Mobile G1● since then rapid development of the platform
  5. 5. Android ecosystem● the worlds 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
  6. 6. Problems● fragmentation● manufacturer/carrier enhancements● updates & support● openness – low quality apps● malware (users)
  7. 7. Sources● developer.android.com● android-developers.blogspot.com● source.android.com● stackoverflow.com● youtube.com/androiddevelopers● svetandroida.cz
  8. 8. 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, ...
  9. 9. Android SDK● android – Android SDK and AVD Manager● adb – Android Debug Bridge● ddms – Dalvik Debug Monitor● emulator● hierarchyviewer● ProGuard● Traceview● docs
  10. 10. Libraries● compatibility libraries● licensing library● AdMob● Google Analytics, Flurry● C2DM
  11. 11. Android internals
  12. 12. Hello World
  13. 13. Android Building Blocks● Activity● Service● Content provider● Broadcast receiver● AndroidManifest.xml
  14. 14. Activity● screen with user interface● the only visual component● examples: – list of emails – email detail – email composition
  15. 15. Service● runs in background● long-running tasks● examples: – music playback service – download service – sync service
  16. 16. Content Provider● manages and shares application data● data storage doesnt 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
  17. 17. 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
  18. 18. AndroidManifest.xml● defines what parts the app have● defines which endpoints are exposed● minimum API level● permissions● declare hardware and software features● required configuration
  19. 19. Intent● asynchronous message● binds components together (all of them except ContentProvider)● starting activities● starting services and binding to services● sending broadcasts
  20. 20. User Interface● defined by hierarchy of views● layouts = containers – LinearLayout – RelativeLayout – FrameLayout● widgets = UI objects – Button, TextView, EditText – WebView
  21. 21. Activity Lifecycle● activities managed in a stack● activity can be in different states during its lifecycle: – foreground – visible – stopped – killed
  22. 22. Intent & Activity● starting activity explicitly● starting activity implicitly● starting activity for result
  23. 23. List Widgets● displays a list of items (some view) – ListView, Spinner, GridView, Gallery● use adapter to bind list to data
  24. 24. Dialogs and Toasts● Dialog – displays modal information – standard dialogs – custom dialogs● Toast – non-modal information – doesnt have user focus
  25. 25. THE END
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×