Your SlideShare is downloading. ×
0
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Introduction to Android Development
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to Android Development

2,386

Published on

An introduction to Android development, as given internally to collegues

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,386
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
141
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
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

    • 1. <ul>Inside Android Sander Alberink 2-9-2011 </ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 2. Agenda <ul><li>Intro to Android development
    • 3. Architecture of the Android OS
    • 4. Architecture of an android application
    • 5. Android future developments </li></ul>
    • 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. <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. What is Android? <ul><li>Open source OS
    • 9. Developed by Google and Open Handset Alliance
    • 10. Based on Linux kernel and many open source libraries
    • 11. Development done in Java
    • 12. Two flavors </li><ul><li>AOSP
    • 13. &apos;With Google&apos; </li></ul></ul>
    • 14. What Android is not <ul><li>It&apos;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. Does not accept Java Bytecode, but only optimized DEX files
    • 16. Class libraries are similar to Java SE, but not completely compatible </li></ul></ul>
    • 17. <ul>Android anatomy </ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 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. Based on Parcels, allows marshalling objects between processes </li></ul></ul><ul><li>Ashmem </li></ul><ul><ul><li>Simpler shared memory implementation
    • 20. Can re-claim shared memory from a crashed program </li></ul></ul><ul><li>Out-of-memory killer
    • 21. Logger </li></ul><ul><ul><li>Basis of Android Logcat system
    • 22. Maintains 4 separate log-buffers, exported via adb </li></ul></ul>
    • 23. Dalvik VM <ul><li>Java interpreter with JIT capability
    • 24. Concurrent GC since 2.3
    • 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. Optimized for low-memory, low-cpu environment
    • 27. Uses a different instruction set than Java VM
    • 28. Contains multiple .class files
    • 29. Class-files are stored uncompressed (execution speed) </li></ul></ul><ul><li>Core libraries based on Apache Harmony project </li></ul>
    • 30. <ul><li>Zygote process preloads typical (approx. 1800) classes and dynamic link libraries so that children start quickly.
    • 31. Copy-on-write </li></ul><ul><ul><li>Only when new process writes page, new page is allocated.
    • 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. 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. Intent system <ul><li>Communication between OS and applications via Intents
    • 35. OS resolves requested action (e.g. &apos;edit contact&apos;) with all registered Intent receivers
    • 36. Highly versatile and modular
    • 37. Allows changing out default functionality for alternatives </li></ul>
    • 38. What is an Android application <ul><li>Collection of building blocks </li></ul><ul><ul><li>Activities
    • 39. Intent Receivers
    • 40. Services
    • 41. Content Providers </li></ul></ul><ul><li>Glued together with XML-files
    • 42. Controlled by manifest file
    • 43. Run as a separate Linux process, in a sandbox
    • 44. Tight security model </li></ul>
    • 45. Activity lifecycle <ul><li>An activity has a defined life-cycle
    • 46. Application can be killed by the Android OS if memory is needed
    • 47. State changes are triggered by Android OS </li></ul>
    • 48. Development environment Android SDK contains the following <ul><li>Android platform libraries
    • 49. API for different android versions
    • 50. Full emulator for system
    • 51. ADB debugger bridge
    • 52. Unit testing environment
    • 53. Eclipse plugin
    • 54. Tooling for performance tuning etc </li></ul>
    • 55. <ul>Intro development on Android </ul><ul>What does the Eclipse plugin offer? </ul><ul><li>Project wizard
    • 56. Coding support
    • 57. Logging
    • 58. Debugging
    • 59. Code generation
    • 60. File explorer
    • 61. Testing
    • 62. Unit testing </li></ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 63. <ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul><ul>Inleiding ontwikkeling op Android </ul>
    • 64. <ul>Intro development on Android </ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 65. Different views
    • 66. <ul>Intro development on Android </ul><ul><li>P roj ect structure
    • 67. Own code
    • 68. Generated code
    • 69. Resources </li></ul><ul><ul><li>Strings
    • 70. Images
    • 71. Layouts
    • 72. Values
    • 73. Animations
    • 74. Measurements </li></ul></ul><ul>6 september 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 75. <ul>Android Future developments </ul><ul><li>Android Open Accessory Protocol
    • 76. Project Tungsten/Android @ Home
    • 77. Google TV
    • 78. Android Native development </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 79. <ul>Android Open Accessory Protocol </ul><ul><li>New way to develop accessories for a telephone
    • 80. Gives the possibility for new accessories and applications for our mobile phones
    • 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. <ul>Project Tungsten </ul><ul><li>Android @Home
    • 83. Nieuwe klasse Android devices
    • 84. Geen UI, wel netwerk en audio uitgangen
    • 85. … En mogelijkheden tot home-control
    • 86. Nieuw protocol (yet another...)
    • 87. Idee is goed: zaken niet via een adapter controleren, maar direct.
    • 88. Low-cost, low maintenance. </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 89. <ul>Android Native Development Kit </ul><ul><li>Development in C/C++
    • 90. Originally only subroutines in C/C++
    • 91. Only suitable for computationally expensive routines (physics, graphical rendering)
    • 92. Now: fully native applications possible </li></ul><ul><li>But beware: </li><ul><li>No POSIX-compliant C-library
    • 93. No kernel headers
    • 94. Straightforward porting of software not always possible </li></ul></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 95. <ul>Android Native Development Kit 2 </ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 96. <ul>Google TV </ul><ul><li>Android, on your TV
    • 97. Version 2.0 to be introduced, based on Honeycomb
    • 98. Finally App-store enabled.
    • 99. Coming to Europe in 2012 </li></ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>
    • 100. <ul>Thank you for your attention! Questions? </ul><ul>27 juni 2011 </ul><ul>www.humiq.nl </ul><ul></ul>

    ×