Mobile app development using Android SDK


Published on

My first Android talk way back in 2010. Covering the foundation of the Android OS and SDK, this talk aimed at giving the audience a starting point to begin developing Android apps.

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Mobile app development using Android SDK

  1. 1. Mobile AppDevelopmentusing AndroidSDKJosh ClemmOctober 27, 2010
  2. 2. Agenda● Overview of Android● Overview of Android App framework● Application Development walkthrough● Demos!
  3. 3. What is Android?● Complete software stack for mobiledevices● Operating system basedon Linux● Middleware● Mobile applications● Developed by Google● The Android SDK● Provides tools and APIs to develop apps inJava
  4. 4. LINUX KERNELLIBRARIES ANDROID RUNTIMEAPPLICATION FRAMEWORKAPPLICATIONSHome Contacts Phone Browser …ActivityManagerWindowManagerContentProvidersView SystemPackageManagerTelephonyManagerResourceManagerLocationManagerNotificationManagerSurfaceManagerMediaFrameworkSQLiteOpenGL | ES FreeType WebKitlibcSSLSGLCoreLibrariesDalvik VirtualMachineDisplayDriverCameraDriverFlash MemoryDriverBinder (IPC)DriverKeypadDriverWifiDriverAudioDriversPowerManagement
  5. 5. Linux Kernel● Android relies on core Linux 2.6services● Security● Memory management● Process management● Network stack● Driver modelLINUX KERNELDisplayDriverCameraDriverFlash MemoryDriverBinder (IPC)DriverKeypadDriverWifiDriverAudioDriversPowerManagement
  6. 6. Android libraries● C library (Bionic)● Media libraries● LibWebCore – web browser engine● SGL – 2G graphics engine● 3D libraries – based on OpenGL ES 1.0● FreeType – bitmap/vector rendering● SQLite relational databaseLIBRARIESSurfaceManagerMediaFrameworkSQLite OpenGL | ESFreeType WebKit libc SSL
  7. 7. Android Runtime● Provides most of thefunctionality of Java’s libraries● Apps run in its own processwithin its own Dalvik VM● Optimized for minimal memory● Register-based vs. stack-based● JIT compilationANDROID RUNTIMECoreLibrariesDalvik VirtualMachineJava SourceCodeJava Byte CodeDalvik ByteCodeDalvikExecutableDalvik VM
  8. 8. APPLICATION FRAMEWORKApplication Framework● Open/consistent development platform● Activity Manager controls lifecycle of app● Access location information● Run background services, addnotifications to the status bar, and more…ActivityManagerWindowManagerContentProvidersView SystemPackageManagerTelephonyManagerResourceManagerLocationManagerNotificationManager
  9. 9. Android Applications● Let’s walkthrough…● Installing what you need● Writing your app● Layouts, Logic, and Images● Testing and debugging withemulator/device● Publishing to App Market
  10. 10. Android Applications● How to get started● Install Java 5 or 6● Download Android SDK● (Optional) Install Eclipse IDE● (Optional) Install Android Eclipse Plugin (ADT)● The ADT plugin can manage installs of variousAndroid versions.● It’s easy to get the latest releases
  11. 11. App Development● Come up with an idea● Determine the layout of the screens● Code logic● Customize look and feel
  12. 12. App Development - Layouts
  13. 13. App Development - Logic● An activity can represent one screen● There’s an activity lifecycle: onCreate(),onStart(), onResume(), onPause(), onStop(),onDestroy()● An activity can have multiple views● Tabs, lists, a map
  14. 14. App Development – running● Use built-inemulator● Mimic any targetdevice● Slow and can’t doeverything● Run on Device● Fast, debuggable
  15. 15. Demos● Cool things like● Embedded map views● Embedded web views● Using location● Using accelerometer
  16. 16. Questions?
  17. 17. Resources●●●● Myself
  18. 18. Backup Slides
  19. 19. Publishing and beyond● Before publishing remember…● Create an icon● Be able to support multiple screen sizes● Be able to support multiple OS versions● You might want to support multiplelanguages
  20. 20. Publishing and beyond● Sign your apps● Add your App to Android Market● Also possible to use third-party appmarkets● Register as an Android developer ($25)● Upload and watch the downloads fly!
  21. 21. Security And Permissions● No App has permission to do anythingthat would impact another app● Apps run in its own process● It’s a secure sandbox● Permissions required are declaredbefore a user installs the app
  22. 22. Filesystem and Database● Each app has its own unique file systemon the phone’s internal memory● App preferences, databases, flat filesreside there● The SD card is a better resource forstoring larger files (like for a game)
  23. 23. Android Resources/res folder R.javaAndroid packageYour codeADT generatesReferenceConstantsRuntime
  24. 24. App Components● Reusable components● Views – GUI widgets like lists, grids, textboxes, embedded web browser● Content providers – access data from otherapps (Contacts)● Resource manager – access to non-coderesources (graphics, layouts, strings)● Activity manager – lifecycle of apps