Ch1 hello, android


Published on

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

Ch1 hello, android

  1. 1.  Chapter 1Hello, Android
  4. 4. OPEN HANDSET ALLIANCE A commitment to openness, a shared vision for the future, andconcrete plans to make the vision a reality. To accelerateinnovation in mobile and offer consumers a richer, less expensive,and better mobile experience. (
  5. 5. Android Devices in the Market  Smartphones Tablets E-reader devices Netbooks MP4 players Internet TVs
  6. 6. Android Devices 
  7. 7. Android Devices  For More Pictures on
  8. 8. What Is Android? Google’s Andy Rubin describes Android as:The first truly open and comprehensive platform for mobile devices, all of thesoftware to run a mobile phone but without the proprietary obstacles that havehindered mobile innovation.(
  9. 9. What Is Android?  A software platform and operating system for mobile devices Based on the Linux kernel Developed by Google and later the Open Handset Alliance (OHA) Allows writing managed code in the Java language Possibility to write applications in other languages and compiling it to ARM native code (support of Google? No) Unveiling of the Android platform was announced on 5 November 2007 with the founding of OHA
  10. 10. What Is Android? Android is made up of several necessary and dependent parts :  A hardware reference design.  A Linux operating system kernel.  Open-source libraries for application development.  A run time used to execute and host Android applications.  An application framework.  A user interface framework.  Preinstalled applications.  A software development kit.
  11. 11. Performance 
  12. 12. Security Android is a multi-process system, in which each application (and parts of thesystem) runs in its own process. Most security between applications and thesystem is enforced at the process level through standard Linux facilities, such asuser and group IDs that are assigned to applications.Additional finer-grained security features are provided through a "permission"mechanism that enforces restrictions on the specific operations that a particularprocess can perform, and per-URI permissions for granting ad-hoc access tospecific pieces of data.
  13. 13. Future possibilities  Google Android Sales to Overtake iPhone in 2012 The OHA is committed to make their vision a reality: to deploy the Android platform for every mobile operator, handset manufacturers and developers to build innovative devices Intel doesn’t want to lose ownership of the netbook market, so they need to prepare for anything, including Android Fujitsu launched an initiative to offer consulting and engineering expertise to help run Android on embedded hardware, which aside from cellphones, mobile internet devices, and portable media players, could include GPS devices, thin-client computers and set-top boxes. More Android devices are coming and some will push the envelope even further
  14. 14. NATIVE ANDROID APPLICATIONS  An e-mail client An SMS management application A full PIM A WebKit-based web browser A music player and picture gallery A camera and video recording application A calculator The home screen An alarm clock
  15. 15. SDK  Android APIs, Full Documentation and Sample code Development tools  Dalvik Debug Monitor Service (DDMS)  Android Debug Bridge (ADB)  Android Emulator Online support and blog Native Development Kit also available  allows developers to implement parts of apps in native-code languages like C/C++  Plug in available to use Eclipse integrated development environment Developer forums and developer phones from Google, MOTODev studio from Motorola
  16. 16. Features of Android Storage (Uses SQLite, a lightweight relational database, for data storage) Connectivity(Supports GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth(includes A2DP and AVRCP), WiFi, LTE, and WiMAX) Messaging(Supports both SMS and MMS) Web browser(Based on the open-source WebKit, together with Chrome’s V8 JavaScript engine) Media support(Includes support for the following media: H.263, H.264 (in 3GP or MP4container), MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC, HE-AAC (inMP4 or 3GP container), MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, andBMP)
  17. 17. Features of Android Con.  Hardware support(Accelerometer Sensor, Camera, Digital Compass, Proximity Sensor, andGPS) Multi-touch(Supports multi-touch screens) Multi-tasking(Supports multi-tasking applications) Flash support(Android 2.3 supports Flash 10.1) Tethering(Supports sharing of Internet connections as a wired/wireless hotspot)
  18. 18. Android Versions webpage link Data collected during a 14-day period ending on May 1, 2012
  19. 19. Android Software Stack 
  20. 20. Android Software Stack  Linux kernel : This is the kernel on which Android is based. This layer contains all thelow-level device drivers for the various hardware components of an Androiddevice Libraries :  A media library for playback of audio and video media  A surface manager to provide display management  Graphics libraries that include SGL and OpenGL for 2D and 3D graphics  SQLite for native database support  SSL and WebKit for integrated web browser and Internet security
  21. 21. Android Software Stack Android run time :   Core libraries : provide most of the functionality available in the core Java libraries as well as the Android-specific libraries.  Dalvik virtual machine : a register-based virtual machine that’s been optimized to ensure that a device can run multiple instances efficiently. Application framework : Exposes the various capabilities of the Android OS to applicationdevelopers so that they can make use of them in their applications. Applications : you will find applications that ship with the Android device(such asPhone, Contacts, Browser, etc.), as well as applications that you downloadand install from the Android Market. Any applications that you write arelocated at this layer
  22. 22. The Dalvik Virtual Machine  All applications written in Java and converted to the dalvik executable .dex Every android app runs its own process, with its own instance of the dalvik virtual machine. Not a traditional JVM, but a custom VM designed to run multiple instances efficiently on a single device. VM uses linux kernel to handle low-level functionality incl. security, threading, process and memory management.
  23. 23. Android Application Architecture  Rich, extensible set of Views  apps can includes lists, grids, text boxes, buttons, web browser Content Providers  allows data access from other applications or share own data Resource Manager  access to localized strings, graphics, layout files Notification Manager  enables custom alerts to be displayed in status bar Activity Manager  Manages lifecycle of applications and provides navigation backstack
  24. 24. Application Fundamentals Activities   application presentation layer Services  invisible components, update data sources, visible activities, trigger notifications  perform regular processing even when app is not active or invisible Content Providers  shareable data store Intents  message passing framework  broadcast messages system wide, for an action to be performed Broadcast receivers  consume intent broadcasts  lets app listen for intents matching a specific criteria like location Notifications ➤ Toast notification ➤ Status Bar Notification ➤ Dialog notification
  25. 25. Applications  All apps (native and 3rd party) are written using the same APIs and run on the same run time executable All apps have APIs for hardware access, location-based services, support for background services, map-based activities, 2D and 3D graphics. App Widgets are miniature app views that can be embedded in other apps like Home Screen
  26. 26. App Priority and Processes  Android apps do not have control over their own life cycles. Aggressively manages resources to ensure device responsiveness and kills process/apps when needed. Active Process – critical priority. Visible Process – high priority. Started Service Process. Background Process – low priority. Empty process.
  27. 27. Compatibility Why?   Allow customizable devices  Create Common eco system Android compatibility is free and easy  Obtain Android source code  Comply with Android Compatibility Definition (ACD) doc  List requirements that need to be met for devices to be compatible with a particular version on Android  Pass the Compatibility Test Suite (CTS)  Automated test harness running on desktop, manages test execution  Test cases written, packaged as .apk to run on actual device or emulator Porting guide available for bringing up Android on custom HW
  28. 28. Android Libraries  Including a set of C/C++ libraries used by components of the Android system Exposed to developers through the Android application framework
  29. 29. Android Libraries  System C library - a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices Media Libraries - based on PacketVideos 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 Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications
  30. 30. Android Libraries  LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view SGL - the underlying 2D graphics engine 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 FreeType - bitmap and vector font rendering SQLite - a powerful and lightweight relational database engine available to all applications
  31. 31. The Android market  Google Market - Part of GMS apps 3rd party apps submitted to Google, approved and distributed through Market. Both Free and Paid apps. Apps now limited to 50 MB; updates possible through Market Monetization through ads available. Available in many countries, not all countries have support for paid apps. Other Market place applications available – Amazon has announced its own Android Market place. App searches filtered based on Manifest file (eg. if a device does not have trackball, apps using trackball will be filtered out). Every app publishes a list of components the app will access and permissions need to be granted before installation. Apps installed on device and SD card (SD Card from Froyo).
  32. 32.
  33. 33. Android vs. J2ME  Multiple device configurations  J2ME has 2 classes of micro devices  Android offers only one Ease of understanding  J2ME has multiple UI model (MIDlets, Xlets, AWT, Swing …)  Android support for only one, so it would be more easier to understand than J2ME
  34. 34. Android vs. J2ME  Responsiveness  Dalvik VM vs. JVM  Dalvik VM vs. KVM Java compatibility  Android runs .dex bytecode  Runtime interpretation of Java bytecode is not possible
  35. 35. Android vs. J2ME  Adoption  Most of mobile phone support for J2ME  But uniformity, cost, ease of development in Android are the reasons for java developer to program for it Java SE support  Android support for J2SE more complete than J2ME CDC (except AWT & Swing)
  36. 36. Apple vs. Android  Games 52.2% of app sales in 2010 350K apps in iStore, 130K in Android market (294K in may) Android easiest to write for  Tools plus getting published Fragmented hardware
  37. 37. Why Android  For end users  No license fee  More than 30K application in the market with 61% are free apps  Supported by dozens of hardware manufacturers  Low price smart-phone devices  Abilities to integrate with Google’s services
  38. 38. Why Android  Android Takes Lead in US Smartphone Market  In January 2011, 31.2% of smartphone market, (7.1% in 2010), 30.4% Blackberry, and 24.7% iPhone  in-u-s-smartphone-market/ Why?
  39. 39. Publishing to the Market  Requires Google Developer Account  $25 fee Link to a Merchant Account  Google Checkout  Link to your checking account  Google gets 30% you get 70%
  40. 40.  NEXT LECTURE CH2 We will be using Eclipse ➤ Set it up.