Introduction to Android Development
Upcoming SlideShare
Loading in...5
×
 

Introduction to Android Development

on

  • 2,528 views

An introduction to Android development, as given internally to collegues

An introduction to Android development, as given internally to collegues

Statistics

Views

Total Views
2,528
Views on SlideShare
2,528
Embed Views
0

Actions

Likes
3
Downloads
133
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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/

Introduction to Android Development Introduction to Android Development Presentation Transcript

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