Your SlideShare is downloading. ×
0
<ul>Inside Android Sander Alberink 2-9-2011 </ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
Agenda <ul><li>Intro to Android development
Architecture of the Android OS
Architecture of an android application
Android future developments </li></ul>
<ul>About me </ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul><ul>Sander Alberink </ul><ul>Senior Technical C...
<ul>Show of hands </ul><ul><li>Who owns an Android phone? </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul><...
What is Android? <ul><li>Open source OS
Developed by Google and Open Handset Alliance
Based on Linux kernel and many open source libraries
Development done in Java
Two flavors </li><ul><li>AOSP
'With Google' </li></ul></ul>
What Android is not <ul><li>It's not another Linux distribution </li></ul><ul><ul><li>Userland is completely different </l...
Does not accept Java Bytecode, but only optimized DEX files
Class libraries are similar to Java SE, but not completely compatible </li></ul></ul>
<ul>Android anatomy </ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
Linux kernel changes <ul><li>Wake-locks </li></ul><ul><ul><li>Handles Android Power management </li></ul></ul><ul><li>Bind...
Based on Parcels, allows marshalling objects between processes </li></ul></ul><ul><li>Ashmem </li></ul><ul><ul><li>Simpler...
Can re-claim shared memory from a crashed program </li></ul></ul><ul><li>Out-of-memory killer
Logger </li></ul><ul><ul><li>Basis of Android Logcat system
Maintains 4 separate log-buffers, exported via adb </li></ul></ul>
Dalvik VM <ul><li>Java interpreter with JIT capability
Concurrent GC since 2.3
16-bit, register-based </li></ul><ul><ul><li>Java VM is 8-bit, stack-based </li></ul></ul><ul><li>Loads DEX files </li></u...
Optimized for low-memory, low-cpu environment
Upcoming SlideShare
Loading in...5
×

Introduction to Android Development

2,394

Published on

An introduction to Android development, as given internally to collegues

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

No Downloads
Views
Total Views
2,394
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
141
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • Kort over mij, niet elk punt noemen, gewoon even wie ik ben
  • Met al deze tools kun je nu een project maken… zie volgende sheets (eerst logging en debugging)
  • Als je emulator draait kun je ook de log gegevens realtime bekijken
  • Nu kun je de applicatie al draaien… zie volgende sheet
  • Volgende sheet: Gui builder voor layouts
  • Mention project necessitas
  • Bionic libc Libc/OpenGL ES/
  • Bionic libc Libc/OpenGL ES/
  • Bionic libc Libc/OpenGL ES/
  • Transcript of "Introduction to Android Development"

    1. 1. <ul>Inside Android Sander Alberink 2-9-2011 </ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    2. 2. Agenda <ul><li>Intro to Android development
    3. 3. Architecture of the Android OS
    4. 4. Architecture of an android application
    5. 5. Android future developments </li></ul>
    6. 6. <ul>About me </ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul><ul>Sander Alberink </ul><ul>Senior Technical Consultant </ul><ul>Android </ul><ul>Qt </ul><ul>Open Source </ul><ul>Working for HUMIQ since 2007 </ul><ul>High Tech </ul><ul>Embedded </ul><ul>Internet </ul><ul>35 years ‘old’ </ul><ul><li>New standards </li></ul><ul>Linux </ul><ul>Telecom </ul>
    7. 7. <ul>Show of hands </ul><ul><li>Who owns an Android phone? </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul><ul><li>Who has a shipping application in the Android Market? </li></ul><ul><li>Who has developed for that Android phone? </li></ul>
    8. 8. What is Android? <ul><li>Open source OS
    9. 9. Developed by Google and Open Handset Alliance
    10. 10. Based on Linux kernel and many open source libraries
    11. 11. Development done in Java
    12. 12. Two flavors </li><ul><li>AOSP
    13. 13. 'With Google' </li></ul></ul>
    14. 14. What Android is not <ul><li>It's not another Linux distribution </li></ul><ul><ul><li>Userland is completely different </li></ul></ul><ul><li>It is not another J2ME implementation </li></ul><ul><ul><li>Uses its own optimized VM: Dalvik
    15. 15. Does not accept Java Bytecode, but only optimized DEX files
    16. 16. Class libraries are similar to Java SE, but not completely compatible </li></ul></ul>
    17. 17. <ul>Android anatomy </ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    18. 18. Linux kernel changes <ul><li>Wake-locks </li></ul><ul><ul><li>Handles Android Power management </li></ul></ul><ul><li>Binder IPC </li></ul><ul><ul><li>Inter process communication system
    19. 19. Based on Parcels, allows marshalling objects between processes </li></ul></ul><ul><li>Ashmem </li></ul><ul><ul><li>Simpler shared memory implementation
    20. 20. Can re-claim shared memory from a crashed program </li></ul></ul><ul><li>Out-of-memory killer
    21. 21. Logger </li></ul><ul><ul><li>Basis of Android Logcat system
    22. 22. Maintains 4 separate log-buffers, exported via adb </li></ul></ul>
    23. 23. Dalvik VM <ul><li>Java interpreter with JIT capability
    24. 24. Concurrent GC since 2.3
    25. 25. 16-bit, register-based </li></ul><ul><ul><li>Java VM is 8-bit, stack-based </li></ul></ul><ul><li>Loads DEX files </li></ul><ul><ul><li>Pre-processed .class files, up to half the original size
    26. 26. Optimized for low-memory, low-cpu environment
    27. 27. Uses a different instruction set than Java VM
    28. 28. Contains multiple .class files
    29. 29. Class-files are stored uncompressed (execution speed) </li></ul></ul><ul><li>Core libraries based on Apache Harmony project </li></ul>
    30. 30. <ul><li>Zygote process preloads typical (approx. 1800) classes and dynamic link libraries so that children start quickly.
    31. 31. Copy-on-write </li></ul><ul><ul><li>Only when new process writes page, new page is allocated.
    32. 32. All pages not be written are shared among all zygote children. </li></ul></ul><ul><li>Exec system call is not used in zygote. </li></ul><ul><ul><li>Exec wipes the page mapping table of the process.
    33. 33. It means exec discards zygote cache. </li></ul></ul><ul><li>Zygote is running as UID=0 (root). After forking child process, its UID is changed by setuid system call. </li></ul>Zygote processes
    34. 34. Intent system <ul><li>Communication between OS and applications via Intents
    35. 35. OS resolves requested action (e.g. 'edit contact') with all registered Intent receivers
    36. 36. Highly versatile and modular
    37. 37. Allows changing out default functionality for alternatives </li></ul>
    38. 38. What is an Android application <ul><li>Collection of building blocks </li></ul><ul><ul><li>Activities
    39. 39. Intent Receivers
    40. 40. Services
    41. 41. Content Providers </li></ul></ul><ul><li>Glued together with XML-files
    42. 42. Controlled by manifest file
    43. 43. Run as a separate Linux process, in a sandbox
    44. 44. Tight security model </li></ul>
    45. 45. Activity lifecycle <ul><li>An activity has a defined life-cycle
    46. 46. Application can be killed by the Android OS if memory is needed
    47. 47. State changes are triggered by Android OS </li></ul>
    48. 48. Development environment Android SDK contains the following <ul><li>Android platform libraries
    49. 49. API for different android versions
    50. 50. Full emulator for system
    51. 51. ADB debugger bridge
    52. 52. Unit testing environment
    53. 53. Eclipse plugin
    54. 54. Tooling for performance tuning etc </li></ul>
    55. 55. <ul>Intro development on Android </ul><ul>What does the Eclipse plugin offer? </ul><ul><li>Project wizard
    56. 56. Coding support
    57. 57. Logging
    58. 58. Debugging
    59. 59. Code generation
    60. 60. File explorer
    61. 61. Testing
    62. 62. Unit testing </li></ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    63. 63. <ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul><ul>Inleiding ontwikkeling op Android </ul>
    64. 64. <ul>Intro development on Android </ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    65. 65. Different views
    66. 66. <ul>Intro development on Android </ul><ul><li>P roj ect structure
    67. 67. Own code
    68. 68. Generated code
    69. 69. Resources </li></ul><ul><ul><li>Strings
    70. 70. Images
    71. 71. Layouts
    72. 72. Values
    73. 73. Animations
    74. 74. Measurements </li></ul></ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    75. 75. <ul>Android Future developments </ul><ul><li>Android Open Accessory Protocol
    76. 76. Project Tungsten/Android @ Home
    77. 77. Google TV
    78. 78. Android Native development </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    79. 79. <ul>Android Open Accessory Protocol </ul><ul><li>New way to develop accessories for a telephone
    80. 80. Gives the possibility for new accessories and applications for our mobile phones
    81. 81. For Android 3.1: </li><ul><li>Phones is USB Host (hookup any gamepad and game on!) </li></ul><li>For Gingerbread 2.3.4: </li><ul><li>Phone is a USB slave, accessory delivers power. </li></ul><li>Protocol is bi-directional </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    82. 82. <ul>Project Tungsten </ul><ul><li>Android @Home
    83. 83. Nieuwe klasse Android devices
    84. 84. Geen UI, wel netwerk en audio uitgangen
    85. 85. … En mogelijkheden tot home-control
    86. 86. Nieuw protocol (yet another...)
    87. 87. Idee is goed: zaken niet via een adapter controleren, maar direct.
    88. 88. Low-cost, low maintenance. </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    89. 89. <ul>Android Native Development Kit </ul><ul><li>Development in C/C++
    90. 90. Originally only subroutines in C/C++
    91. 91. Only suitable for computationally expensive routines (physics, graphical rendering)
    92. 92. Now: fully native applications possible </li></ul><ul><li>But beware: </li><ul><li>No POSIX-compliant C-library
    93. 93. No kernel headers
    94. 94. Straightforward porting of software not always possible </li></ul></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    95. 95. <ul>Android Native Development Kit 2 </ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    96. 96. <ul>Google TV </ul><ul><li>Android, on your TV
    97. 97. Version 2.0 to be introduced, based on Honeycomb
    98. 98. Finally App-store enabled.
    99. 99. Coming to Europe in 2012 </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    100. 100. <ul>Thank you for your attention! Questions? </ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    1. A particular slide catching your eye?

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

    ×