Más contenido relacionado


Intro To Android App Development

  1. Introduction to Android Application Development Mike Kvintus Principal Engineer JDSU
  2. What is Android?
  3. Android Fundamentals
  4. Getting Started with App Development
  5. Demo
  6. Tips/Links
  7. Android Background
  8. Part of the Open Handset Alliance
  9. 1.6 – Donut Sept 15, 2009
  10. 2.0/2.0.1 – Eclair Oct 26, 2009
  11. 2.1 – Eclair Jan 12, 2010 Android Background
  12. October, 2009, Gartner Inc. predicted that by 2012, Android would become the world's second most popular smartphone platform, behind only Symbian OS
  13. Runs a Linux kernel
  14. App development uses the Java language syntax
  15. What is Android?
  16. Dalvik virtual machine optimized for mobile devices
  17. Integrated browser based on the open source WebKit engine
  18. Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
  19. SQLite for structured data storage
  20. Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
  21. GSM Telephony (hardware dependent)
  22. Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
  23. Camera, GPS, compass, and accelerometer (hardware dependent)
  24. Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE
  25. Android Architecture
  26. Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data
  27. A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files
  28. A Notification Manager that enables all applications to display custom alerts in the status bar
  29. An Activity Manager that manages the lifecycle of applications and provides a common navigation backstack
  30. Media Libraries - based on PacketVideo's OpenCORE; the libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG
  31. Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications
  32. LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view
  33. SGL - the underlying 2D graphics engine
  34. 3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer
  35. FreeType - bitmap and vector font rendering
  36. SQLite - a powerful and lightweight relational database engine available to all applications
  37. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint
  38. Android Fundamentals
  39. Reside under the res/ directory
  40. Accessed via the generated R class
  41. Apps can have 1 or more activities
  42. Each activity is given a default window to draw in
  43. Visual content of the window is provided by a hierarchy of views
  44. One activity is designated the first one shown
  45. Move from one activity to another by having the current activity start the next activity
  46. Launched by passing an Intent object to Context.startActivity() or Activity.startActivityForResult()
  47. Stopped by calling finish() or finishActivity() of another Activity
  48. Start a service
  49. Code can “bind” to a service and communicate with the service via the interface the service exposes
  50. Runs on the app's main thread, so time consuming tasks should spawn another thread to avoid blocking the UI or other components
  51. Launched by passing an Intent object to Context.startService()
  52. Stopped by calling stopSelf() or Context.stopService()
  53. Many broadcasts come from system code but apps can also initiate broadcasts
  54. Activated when targeted by a request from a ContentResolver
  55. Component Lifecycles
  56. Describes the components of the app (activities, services, broadcast receivers, and content providers) **
  57. Declares which permissions the app must have in order to access protected parts of the API and interact with other apps
  58. Declares the permissions that others are required to have in order to interact with the app's components
  59. Declares the minimum level of the Android API required
  60. Lists the libraries that the app must be linked against
  61. Determines which processes will host app components
  62. Main component of the location framework is the LocationManager system service
  63. geo nmea $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62
  64. Main class in the Maps package is, a subclass of ViewGroup
  65. Wrapper around Google Maps API
  66. Not part of the standard Android library
  67. To display Google Maps data in a MapView, you must register with the Google Maps service and obtain a Maps API Key
  68. Network –* and* classes
  69. Getting Started with App Development
  70. Java 5 or 6 JDK (JRE alone is not sufficient)
  71. Apache Ant 1.6.5 or later for Linux and Mac, 1.7 or later for Windows
  72. Android SDK ( )
  73. Web apps
  74. Get Google Maps API key (required if using Google Maps API)
  75. Decide on the lowest release of Android you want to target
  76. Create Android Project
  77. Create components, layouts, classes, etc
  78. Test using emulator
  79. Export application package (.apk)
  80. Load/test on Android device
  81. Publish to Android Market (app must be signed, $25 signup fee ) or make app available for download
  82. Android Fragmentation Android Platform Versions Source: Source:
  83. Turn on "USB Debugging" on your device
  84. Demo Time
  85. For ListView, use android:cacheColorHint="#00000000" when using a background image
  86. Test with different screen resolutions and different devices if possible
  87. Target the appropriate release of Android
  88. Ruboto - JRuby on Android
  89. ASE – Android Scripting Environment
  90. Many others
  91. THANKS! Q & A