KEMBAR78
Android Workshop Session 1 | PDF
Session #1

05-02-2012   http://www.iwillstudy.com/group/android
Mobile Ecosystem

                OEM

    Service            Developers
    Provider


               Users
Mobile Operating Systems
   Android
   Symbian
   iOS
   Blackberry OS
   Samsung Bada
   Windows Mobile
   Windows Phone 7
Key Differences: Android vs. iPhone

        iPhone                           Android
   OS is proprietary               OS is open source
   OS runs on iPhone or iPod       OS can be licensed for
    Touches only                     any mobile device
   Apps written in Objective-      Apps written in Java
    C                               Dev tools for many OS’s
   Dev tools Mac-only              No approval process for
   Apple must approve all           apps  Android Market
    apps  Application Store        All apps considered
                                     equal (choose your
                                     browser)
Android History
   Founded in 2003.
   Acquired by Google in August 2005
   OHA was firmed in November 2007.
   Since October 2008 Android has been available
    under a Free Space Software/Open Source License.
Open Handset Alliance (OHA)
Open Handset Alliance (OHA)
Open Handset Alliance (OHA)
Android Versions

                                                 Distribution      API level     %

                                                 1.5 Cupcake       3           0.6%
                                   1.5
      1.0          1.1
                                Cup Cake
   Sept 2008    Feb 2009                         1.6 Donut         4           1.0%
                                April 2009

                                                 2.0, 2.1 Eclair   7           7.6%
      1.6       2.0/2.1            2.2
     Donut       Éclair           Froyo          2.2 Froyo         8           27.8%
   Sept 2009    Oct 2009        May 2002
                                                 2.3.x Gingerbr
                                                                9-10           58.6%
                                                 ead
   2.3/2.3.3        3.X             4.0
  Gingerbread   Honeycomb   Ice-Cream Sandwich   3.x.x Honeyco
                                                               11-13           3.4%
   Dec 2010      Feb 2011        Oct 2011        mb
                                                 4.0.x Ice
Usage share of the different                     Cream             14-16       1.0%
                                                 Sandwich
versions, by February 1, 2011
Google Services
   Gmail
   Maps
   Docs
   Latitude
   Calendar
   Google Talk
Market Place



  Market?   Revenue?    Free    Review
                       Apps?   Systems?
Why Android is growing?

             • Open Source
Developers   • Free SDK
             • Easy To Use APIs


             • Free
  OEMs       • Open Standards (Design/Hardware)



  Service    • Suits Business Model
 Providers   • Huge Market Space
Introduction to Android Platform
     Android is an open software platform for mobile
      development.
Android Architecture
Linux Kernel



   The architecture is based on the Linux 2.6 kernel.
    Android use Linux kernel as its hardware abstraction
    layer.
   It also provides memory management, process
    management, a security model, and
    networking, a lot of core operating system
    infrastructures that are robust and have been proven
    over time.
Native Libraries




 The next level up is the native libraries.
  Everything that you see here in green is written
  in C and C++.
 It's at this level where a lot of the core power

  of the Android platform comes from.
Android Run Time
Android Run Time
Application Framework
Application Framework
Application Framework
Application Framework
Application Framework
Applications




   And the final layer on top is Applications.
   This is where all the applications get written.
   It includes the home application, the contacts application, the
    browser, and your apps.
   And everything at this layer is, again, using the same app
    framework provided by the layers below.
Application Building Blocks
   Now, if you're going to write an app, the first step is to
    decompose it into the components that are supported by
    the Android platform.
                           • UI component typically corresponding to
           Activity          one screen.

                           • Responds to notification or status changes.
       Intent Receiver       Can wake up your process.


           Service         • Faceless task that runs in the background.


      Content Provider     • Enable applications to share data
Application Building Blocks



An activity is a single, focused
 thing that the user can do.
Activity Lifecycle

Actual Representation
Actual Representation




                        Component
                        Lifecycles
Application Building Blocks



 They are nothing Else but
  messages.
 We need to intent if we need to
  start any Activity , Service or
  Broadcast Messages.
An Activity Diagram




  Activity One   Intent   Activity Two
Application Building Blocks



   A service run in the background.
   User for long running task.
   A good example is a music player.
   A Service is not a separate process and A
    Service is not a thread.
Component Services


                 Notification


               Communication
                                 Service
                 Pause/rewind              Background running
                 /stop/restart             for playback
Media Player
  Activity            Binder
Application Building Blocks



   Content providers store and retrieve data and
    make it accessible to all applications.
    This is only way to share data across applications.
   Examples of Content Provider – Contacts, SMS,
    Calendar, User Define etc.. And NOT email
Components - Content Providers

                            Application

                                Activity       Activity
 Application                                               Application

         Activity                  Content Resolver                Service


  Content Resolver                  Content Provider        Content Resolver




                                                          Remote
                     Data           SQLite      XML        Store
   Let’s make our First AVD
     Android Virtual Device
IDE + Hello World + Program
Structure
      Lets jump into programming now !!




Learning Android is as simple as biting an Apple!
Installations
       &
Configuration
Installation Resources
   At Least 2GB of Ram minimum.
   Install Java Run Time.
   Copy Android SDK directories into your system
   Install Android SDK manager
   Get Eclipse
   Add ADT plug-in to Eclipse
   Get Android SDK directory on eclipse
SESSION 1 OVER

Android Workshop Session 1

  • 1.
    Session #1 05-02-2012 http://www.iwillstudy.com/group/android
  • 2.
    Mobile Ecosystem OEM Service Developers Provider Users
  • 3.
    Mobile Operating Systems  Android  Symbian  iOS  Blackberry OS  Samsung Bada  Windows Mobile  Windows Phone 7
  • 4.
    Key Differences: Androidvs. iPhone iPhone Android  OS is proprietary  OS is open source  OS runs on iPhone or iPod  OS can be licensed for Touches only any mobile device  Apps written in Objective-  Apps written in Java C  Dev tools for many OS’s  Dev tools Mac-only  No approval process for  Apple must approve all apps  Android Market apps  Application Store  All apps considered equal (choose your browser)
  • 5.
    Android History  Founded in 2003.  Acquired by Google in August 2005  OHA was firmed in November 2007.  Since October 2008 Android has been available under a Free Space Software/Open Source License.
  • 6.
  • 7.
  • 8.
  • 9.
    Android Versions Distribution API level % 1.5 Cupcake 3 0.6% 1.5 1.0 1.1 Cup Cake Sept 2008 Feb 2009 1.6 Donut 4 1.0% April 2009 2.0, 2.1 Eclair 7 7.6% 1.6 2.0/2.1 2.2 Donut Éclair Froyo 2.2 Froyo 8 27.8% Sept 2009 Oct 2009 May 2002 2.3.x Gingerbr 9-10 58.6% ead 2.3/2.3.3 3.X 4.0 Gingerbread Honeycomb Ice-Cream Sandwich 3.x.x Honeyco 11-13 3.4% Dec 2010 Feb 2011 Oct 2011 mb 4.0.x Ice Usage share of the different Cream 14-16 1.0% Sandwich versions, by February 1, 2011
  • 10.
    Google Services  Gmail  Maps  Docs  Latitude  Calendar  Google Talk
  • 11.
    Market Place Market? Revenue? Free Review Apps? Systems?
  • 12.
    Why Android isgrowing? • Open Source Developers • Free SDK • Easy To Use APIs • Free OEMs • Open Standards (Design/Hardware) Service • Suits Business Model Providers • Huge Market Space
  • 13.
    Introduction to AndroidPlatform  Android is an open software platform for mobile development.
  • 14.
  • 15.
    Linux Kernel  The architecture is based on the Linux 2.6 kernel. Android use Linux kernel as its hardware abstraction layer.  It also provides memory management, process management, a security model, and networking, a lot of core operating system infrastructures that are robust and have been proven over time.
  • 16.
    Native Libraries  Thenext level up is the native libraries. Everything that you see here in green is written in C and C++.  It's at this level where a lot of the core power of the Android platform comes from.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
    Applications  And the final layer on top is Applications.  This is where all the applications get written.  It includes the home application, the contacts application, the browser, and your apps.  And everything at this layer is, again, using the same app framework provided by the layers below.
  • 25.
    Application Building Blocks  Now, if you're going to write an app, the first step is to decompose it into the components that are supported by the Android platform. • UI component typically corresponding to Activity one screen. • Responds to notification or status changes. Intent Receiver Can wake up your process. Service • Faceless task that runs in the background. Content Provider • Enable applications to share data
  • 26.
    Application Building Blocks Anactivity is a single, focused thing that the user can do. Activity Lifecycle Actual Representation
  • 28.
    Actual Representation Component Lifecycles
  • 29.
    Application Building Blocks They are nothing Else but messages.  We need to intent if we need to start any Activity , Service or Broadcast Messages.
  • 30.
    An Activity Diagram Activity One Intent Activity Two
  • 31.
    Application Building Blocks  A service run in the background.  User for long running task.  A good example is a music player.  A Service is not a separate process and A Service is not a thread.
  • 32.
    Component Services Notification Communication Service Pause/rewind Background running /stop/restart for playback Media Player Activity Binder
  • 33.
    Application Building Blocks  Content providers store and retrieve data and make it accessible to all applications.  This is only way to share data across applications.  Examples of Content Provider – Contacts, SMS, Calendar, User Define etc.. And NOT email
  • 34.
    Components - ContentProviders Application Activity Activity Application Application Activity Content Resolver Service Content Resolver Content Provider Content Resolver Remote Data SQLite XML Store
  • 35.
    Let’s make our First AVD Android Virtual Device
  • 36.
    IDE + HelloWorld + Program Structure Lets jump into programming now !! Learning Android is as simple as biting an Apple!
  • 37.
    Installations & Configuration
  • 38.
    Installation Resources  At Least 2GB of Ram minimum.  Install Java Run Time.  Copy Android SDK directories into your system  Install Android SDK manager  Get Eclipse  Add ADT plug-in to Eclipse  Get Android SDK directory on eclipse
  • 39.