SlideShare a Scribd company logo
1 of 62
Download to read offline
id
                        ero old
                     itd le M
                       l
                   Tn bi tle
            ner
                   A o Ti
         ie
                le e Mub
        W
     av
   d
          og g Th S
Na
       o in
  G    ak
     re
   B                    8
                     200
                th
                8
            er 1
           b
       ce m
     De
Hello Android




                2
Target Audience


    • Mobile software developers
    • People shopping for a phone in 2009




                                            3
Agenda

  • Hello Android
  • Architecture Overview, Features and
    Components
  • Android Software Development
  • Live Demo




                                          4
Hello Android

   • Android is a platform for mobile
     computing
     • Android is Linux based


     • But development is in
       Java


                                        5
Hello Android

   • Why did Google make Android?
       • IPhone does not support Java
       • JavaME’s CLDC+MIDlets are getting
         old
       • Leaves lots of mobile developers in
         search of a platform
       • Profit – ads, market
   • Clean break from J2ME
                                               6
Hello Android::Timeline
As published by Google




                          7
Hello Android::Timeline
As published by Google
Hello Android::Timeline
As published by Google




                          • We’ll have a look at
                            some of the winners
                            later on
Hello Android::Timeline
As published by Google




                     • Only free applications for
                          now
                     • Eventually, Google will
                          take a 30% cut
Hello Android::Timeline
As published by Google
Hello Android::Timeline
As published by Google
Hello Android::Timeline
As published by Google
Hello Android::Devices


   • HTC G1, Lenovo OPhone (expected),
     Kogan Agora




                                         14
Hello Android::ADC


  • The Android Developer Challenge
    • 10,000,000$ in prizes




                                      15
Hello Android::ADC


  • ADC I concluded:
      • 5M$ in prizes
      • Over 1,700 submissions




  • Announcement regarding
     ADC II is expected soon
                                 16
Hello Android::ADC Winners & Market


  • Wikitude (Philipp Breuce)
    • Wikipedia overlaid on camera view




                                          17
Hello Android::ADC Winners & Market


  • BreadCrumbz (Amos Yoffe)
    • Navigate using maps and pictures (like
       Myst)




                                               18
Hello Android::ADC Winners & Market


  • Amazon MP3 for Android
    • Preinstalled on HTC G1 phones




                                      19
Hello Android::ADC Winners & Market

• Compare Everywhere (Jeffrey Sharkey)
 • Capture barcodes, search for better deals
    nearby




                                               20
Agenda

  • Hello Android
  • Architecture Overview, Features and
    Components
  • Android Software Development
  • Live Demo




                                          21
Architecture Overview

             Applications
              •Implement and leverage framework concepts
              •Use framework components and services

    Android Application Framework
                                                     Package          Content
           Views         Activities    Services     Management       Providers

    Native Libraries        Android Runtime       Apache Harmony      Dalvik VM


                         Graphics
        Media                            WebKit        SQLite
                         Libraries
      Framework                          Browser      Database


    Linux Kernel
                               Inter Process                         Power
                                                   Device
                                  Comms.
              Security                                             Management
                                                   Drivers

                                                                                  22
Architecture Overview


   • Let’s examine some of these boxes,
     beginning with Linux:




    Linux Kernel
Architecture Overview


   • From Linux Android gains:
    • A stable common base for Dalvik
       applications
    • Fine grained power management
    • Unique user per bundle – sandboxing
    • Much more…


                                            24
• Native libraries provide functionality



 Native Libraries




 Linux Kernel
Architecture Overview


   • WebKit
    • Same browser engine
       used in IPhone,
       Google Chrome,
       Safari
    • Strong performer
    • Memory efficient
    • Good standards support
                               26
Architecture Overview


   • Location Services & Mapping
    • Google Maps
    • Street view
    • GPS
      • Trigger proximity
         alerts
Architecture Overview


   • Graphics
    • SGL – 2D scalable graphics
    • OpenGL ES
    • Surface Manager composes surfaces
       together




                                          28
Architecture Overview


   • Media Framework
    • Player and codecs
   • SQLite
    • Lightweight RDBMS also on IPhone
   • ... and Telephony too!



                                         29
Architecture Overview::
Android Runtime

   Moving on to the “Java” runtime
    environment:


    Native Libraries   Android Runtime




    Linux Kernel



                                         30
Architecture Overview::
Dalvik Virtual Machine

   • Java has a stack based VM
   • Dalvik is a register based VM
     • Better interpreter performance
     • No JIT
   • Bottom line:
     • Lower throughput
     • Better startup & responsiveness
                                         31
Architecture Overview::
Dalvik Virtual Machine



   • You still get to develop in
     Java • What, no JVM!?
     • Excellent learning curve




                                   32
Architecture Overview::Zygote


   • Quick Dalvik process startup is
     essential for good responsiveness
   • During boot, Android creates a fully
     bootstrapped Dalvik process
   • Sends it to sleep
   • Forks it on demand
   • Forks are copy-on-write
    • Near instantaneous startup!
                                            33
Architecture Overview

             Applications
              •Implement and leverage framework concepts
              •Use framework components and services

    Android Application Framework
                                                     Package          Content
           Views         Activities    Services     Management       Providers

    Native Libraries        Android Runtime       Apache Harmony      Dalvik VM


                         Graphics
        Media                            WebKit        SQLite
                         Libraries
      Framework                          Browser      Database


    Linux Kernel
                               Inter Process                         Power
                                                   Device
                                  Comms.
              Security                                             Management
                                                   Drivers

                                                                                  34
Agenda

  • Hello Android
  • Architecture Overview, Features and
    Components
  • Android Software Development
  • Live Demo




                                          35
Android Application Framework


  • Building Blocks
  • Application Model
  • UI Perspective




                                36
Building Blocks


   • Four building blocks
    • Activities and Intents
    • Broadcast Receivers
    • Services
    • Content Providers



                               37
Activities and Intents



   Activities

   Android documentation states:
   • “An activity is a single, focused thing
     that the user can do.”



                                               38
Activities and Intents


   • This how an activity will look like:




                                            39
Activities and Intents


   • Well, actually: “An activity is usually a
     single screen in your application.”




                                                 40
Activities and Intents


   • Activities communicate with each other
     using Intents
                 new Intent(
           ?                                            !
                       Intent.ACTION_VIEW,
                       Intent.ACTION_DIAL,
                       Intent.ACTION_PICK,
                       new Uri(quot;content://contactsquot;))
                             Uri(“geo:38.8995,-
                             Uri(“tel:555-1234quot;))
                 77.0364quot;))




   • The Intent is resolved to another
     Activity, by matching it against an
     Intent Filter.
                                                            41
Activities and Intents

   • Intents convey
     •   Data

                          This is how
                            Intent Filters
                            match Intents
                            that are valid
     •   Action

                            for the Activity
     •



     •   and Categories
                                           42
Activities and Intents


   • Activities are managed on
     a stack
       • Once you go back they
         pop!




                                 43
Activities and Intents


   • Activities have a life cycle
    New          Stopped    Paused
                                                   Running...
   Activity      Activity   Activity




                                         Processes with non-
                                       running Activities may be
                                        killed to free resources

                                                                   44
Broadcast Receivers


  • Listens for Intents
    • Incoming call
    • Network availability changes
    • Alarms
  • Application doesn't have to be running
     once a Receiver is registered
  • Does not display UI
    • May use notifications                  45
Services


  • Services perform long running actions
    • i.e. Play music, factor primary numbers
  • Services are defined via AIDL
    • Yet another “Interface Definition
       Language”
  • Service lifecycle: manual or automatic
  • Can be run either in-process or
     in another process
                                                46
Content Providers


  • Android likes to expose content in a
     RESTful manner
    • All content items have a unique URI
    • Goes really well with Activity history
  • Content Providers are used for CRUD
     operations over arbitrary content
     repositories

                                               47
Content Providers


  • The interface has a strong relational
     feel
    • Hard to adapt to POJO backends like
       DB4O and Perst
    • Despite looking relational, the interface
       encourages static joins
      • Data returned should have a uniform
         shape

                                                  48
Application Model


   • Android Package (.apk)
    • Compiled code & resources
    • Manifest
    • Must be signed (like jar)
   • Task
    • “perceived” application
    • May span activities across several
       packages and processes              49
UI Perspective

  • Views
   • From very simple:
     • EditText, CheckBox, Button, Radio
   • To more specialized:
     • DatePicker, AutoComplete
   • ViewGroups (layout)
     • Relative, Table, Linear, …
   • Web, Video, Map, Gallery...           50
UI Perspective


   • Sometimes the border between Views
     and Activities isn't clear
     • MapView
     • MapActivity
   • Choose MapActivity for a mashup
   • Choose MapView for your own Activity


                                            51
Android Software Development


  • Let's have a look at a “hello world”
     sample provided by the SDK:
    • Activity source file
    • Layout file
    • Android Manifest



                                           52
Android Software Development


  package com.example.android.helloactivity;

  //...

  /**
   * A minimal quot;Hello, World!quot; application.
   */
  public class HelloActivity extends Activity {
      /**
       * Called with the activity is first created.
       */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);

          // Set the layout for this activity. You can find it
          // in res/layout/hello_activity.xml
          setContentView(R.layout.hello_activity);
      }
  }



                                                                 53
Android Software Development


<EditText
    xmlns:android=quot;http://schemas.android.com/apk/res/androidquot;
    android:id=quot;@+id/textquot;
    android:layout_width=quot;fill_parentquot;
    android:layout_height=quot;fill_parentquot;
    android:textSize=quot;18spquot;
    android:autoText=quot;truequot;
    android:capitalize=quot;sentencesquot;
    android:text=quot;hello, world!quot; />




                                                             54
Android Software Development


<manifest
    xmlns:android=quot;http://schemas.android.com/apk/res/androidquot;
    package=quot;com.example.android.helloactivityquot;>
  <application android:label=quot;Hello, Activity!quot;>
    <activity android:name=quot;HelloActivityquot;>
      <intent-filter>
       <action android:name=quot;android.intent.action.MAINquot;/>
       <category android:name=quot;android.intent.category.LAUNCHERquot;/>
      </intent-filter>
    </activity>
  </application>
</manifest>
                                                                 55
Android Software Development


  • After build and deployment to the
     emulator:




                                        56
UI Perspective


   • Android UI lends itself to a clear flow
     between simple screens




                                               57
UI Perspective

   • Rich clients, on the other hand…




   … Don’t translate that well.
                                        58
Porting Scenarios


   • Opera
    • Opera Mini uses
   • Jetty has been ported
    • local web applications
   • Apache Felix has been ported
    • OSGi bundles
      • Alef Arendsen’s session covers OSGi in
         Spring                                  59
Tool Support


  • Android SDK and Eclipse plugin:
     http://code.google.com/android/
  • IntelliJ IDEA plugin is available here:
     http://code.google.com/p/idea-android/
    • SDK can create IDEA project files
  • NetBeans plugin available here:
     http://kenai.com/projects/nbandroid/
  • DroidDraw is an Android UI builder:
     http://www.droiddraw.org/                60
References

 • Android homepage:
    http://code.google.com/android/index.html
 • Open Handset Alliance:
    http://www.openhandsetalliance.com/
 • Android Market:
    http://www.android.com/market/
 • Android documentation:
    http://code.google.com/android/documentation.html

 • Android open source project:
    http://source.android.com/
                                                        61
Demo
          Apps for Android:
http://code.google.com/p/apps-for-android




                                            62

More Related Content

What's hot

Marakana Android Internals
Marakana Android InternalsMarakana Android Internals
Marakana Android InternalsMarko Gargenta
 
Multichannel User Interfaces
Multichannel User InterfacesMultichannel User Interfaces
Multichannel User InterfacesPedro J. Molina
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Marko Gargenta
 
Dominik Gusenbauer Qt Mobility
Dominik Gusenbauer  Qt MobilityDominik Gusenbauer  Qt Mobility
Dominik Gusenbauer Qt MobilityNokiaAppForum
 
Android application development
Android application developmentAndroid application development
Android application developmentFahad A. Shaikh
 
Smartphone Behavior On A Featurephone Budget
Smartphone Behavior On A Featurephone BudgetSmartphone Behavior On A Featurephone Budget
Smartphone Behavior On A Featurephone BudgetGail Frederick
 
Qt App Development for Symbian & MeeGo - v3.4.6 (17. January 2012)
Qt App Development for Symbian & MeeGo - v3.4.6 (17. January 2012)Qt App Development for Symbian & MeeGo - v3.4.6 (17. January 2012)
Qt App Development for Symbian & MeeGo - v3.4.6 (17. January 2012)Andreas Jakl
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressionsShafaq Abdullah
 
Silent Data Corruption in Servers
Silent Data Corruption in ServersSilent Data Corruption in Servers
Silent Data Corruption in ServersIshwar Parulkar
 
Fundamentals of Using Open Source Code to Build Products
Fundamentals of Using Open Source Code to Build ProductsFundamentals of Using Open Source Code to Build Products
Fundamentals of Using Open Source Code to Build ProductsBrian Warner
 
Droidcon2013 helleberg kruemmling_androidgoesreading_inovex_telekom
Droidcon2013 helleberg kruemmling_androidgoesreading_inovex_telekomDroidcon2013 helleberg kruemmling_androidgoesreading_inovex_telekom
Droidcon2013 helleberg kruemmling_androidgoesreading_inovex_telekomDroidcon Berlin
 
Kerberos + Android: A Tale of Opportunity
Kerberos + Android: A Tale of OpportunityKerberos + Android: A Tale of Opportunity
Kerberos + Android: A Tale of OpportunitywolfSSL
 
SoftTech Corporate Presentation
SoftTech Corporate PresentationSoftTech Corporate Presentation
SoftTech Corporate PresentationSoftTech Engineers
 
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...Andreas Jakl
 

What's hot (17)

Marakana Android Internals
Marakana Android InternalsMarakana Android Internals
Marakana Android Internals
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
J2me step by step
J2me step by stepJ2me step by step
J2me step by step
 
Multichannel User Interfaces
Multichannel User InterfacesMultichannel User Interfaces
Multichannel User Interfaces
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010
 
Dominik Gusenbauer Qt Mobility
Dominik Gusenbauer  Qt MobilityDominik Gusenbauer  Qt Mobility
Dominik Gusenbauer Qt Mobility
 
Android application development
Android application developmentAndroid application development
Android application development
 
Smartphone Behavior On A Featurephone Budget
Smartphone Behavior On A Featurephone BudgetSmartphone Behavior On A Featurephone Budget
Smartphone Behavior On A Featurephone Budget
 
Qt App Development for Symbian & MeeGo - v3.4.6 (17. January 2012)
Qt App Development for Symbian & MeeGo - v3.4.6 (17. January 2012)Qt App Development for Symbian & MeeGo - v3.4.6 (17. January 2012)
Qt App Development for Symbian & MeeGo - v3.4.6 (17. January 2012)
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressions
 
Design and Concepts of Android Graphics
Design and Concepts of Android GraphicsDesign and Concepts of Android Graphics
Design and Concepts of Android Graphics
 
Silent Data Corruption in Servers
Silent Data Corruption in ServersSilent Data Corruption in Servers
Silent Data Corruption in Servers
 
Fundamentals of Using Open Source Code to Build Products
Fundamentals of Using Open Source Code to Build ProductsFundamentals of Using Open Source Code to Build Products
Fundamentals of Using Open Source Code to Build Products
 
Droidcon2013 helleberg kruemmling_androidgoesreading_inovex_telekom
Droidcon2013 helleberg kruemmling_androidgoesreading_inovex_telekomDroidcon2013 helleberg kruemmling_androidgoesreading_inovex_telekom
Droidcon2013 helleberg kruemmling_androidgoesreading_inovex_telekom
 
Kerberos + Android: A Tale of Opportunity
Kerberos + Android: A Tale of OpportunityKerberos + Android: A Tale of Opportunity
Kerberos + Android: A Tale of Opportunity
 
SoftTech Corporate Presentation
SoftTech Corporate PresentationSoftTech Corporate Presentation
SoftTech Corporate Presentation
 
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
 

Similar to Google Android @ AlphaCSP's JavaEdge

An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009sullis
 
Android : How Do I Code Thee?
Android : How Do I Code Thee?Android : How Do I Code Thee?
Android : How Do I Code Thee?Viswanath J
 
Developing and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-androidDeveloping and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-androidElvis Jon Freddy Sitinjak
 
Android Overview
Android OverviewAndroid Overview
Android Overviewatomi
 
Keynote Client Connectivity And The Cloud
Keynote Client Connectivity And The CloudKeynote Client Connectivity And The Cloud
Keynote Client Connectivity And The CloudGoogleTecTalks
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The BasicsMike Desjardins
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osArnav Gupta
 
Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android DevelopmentHayi Nukman
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portlandsullis
 
Android operating system
Android operating systemAndroid operating system
Android operating systemDev Savalia
 
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Mathias Seguy
 
An introduction on Android OS, its working and android development
An introduction on Android OS, its working and android developmentAn introduction on Android OS, its working and android development
An introduction on Android OS, its working and android developmentSanskar Saraf
 
Android and its feature
Android and its featureAndroid and its feature
Android and its featureShubham Kumar
 
An introduction on Android OS, its working and android development
An introduction on Android OS, its working and android developmentAn introduction on Android OS, its working and android development
An introduction on Android OS, its working and android developmentSanskar Saraf
 
Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
 Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
Developing for BlackBerry 10 – Tools and SDKs by Luca FilighedduCodemotion
 

Similar to Google Android @ AlphaCSP's JavaEdge (20)

An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
Android : How Do I Code Thee?
Android : How Do I Code Thee?Android : How Do I Code Thee?
Android : How Do I Code Thee?
 
Developing and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-androidDeveloping and-benchmarking-native-linux-applications-on-android
Developing and-benchmarking-native-linux-applications-on-android
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 
Keynote Client Connectivity And The Cloud
Keynote Client Connectivity And The CloudKeynote Client Connectivity And The Cloud
Keynote Client Connectivity And The Cloud
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android Development
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portland
 
ANDROID NEW EDITION
ANDROID NEW EDITIONANDROID NEW EDITION
ANDROID NEW EDITION
 
Android operating system
Android operating systemAndroid operating system
Android operating system
 
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
 
Gl android platform
Gl android platformGl android platform
Gl android platform
 
Seminar report on android os
Seminar report on android osSeminar report on android os
Seminar report on android os
 
An introduction on Android OS, its working and android development
An introduction on Android OS, its working and android developmentAn introduction on Android OS, its working and android development
An introduction on Android OS, its working and android development
 
My androidpresentation
My androidpresentationMy androidpresentation
My androidpresentation
 
Android and its feature
Android and its featureAndroid and its feature
Android and its feature
 
An introduction on Android OS, its working and android development
An introduction on Android OS, its working and android developmentAn introduction on Android OS, its working and android development
An introduction on Android OS, its working and android development
 
Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
 Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

Google Android @ AlphaCSP's JavaEdge

  • 1. id ero old itd le M l Tn bi tle ner A o Ti ie le e Mub W av d og g Th S Na o in G ak re B 8 200 th 8 er 1 b ce m De
  • 3. Target Audience • Mobile software developers • People shopping for a phone in 2009 3
  • 4. Agenda • Hello Android • Architecture Overview, Features and Components • Android Software Development • Live Demo 4
  • 5. Hello Android • Android is a platform for mobile computing • Android is Linux based • But development is in Java 5
  • 6. Hello Android • Why did Google make Android? • IPhone does not support Java • JavaME’s CLDC+MIDlets are getting old • Leaves lots of mobile developers in search of a platform • Profit – ads, market • Clean break from J2ME 6
  • 9. Hello Android::Timeline As published by Google • We’ll have a look at some of the winners later on
  • 10. Hello Android::Timeline As published by Google • Only free applications for now • Eventually, Google will take a 30% cut
  • 14. Hello Android::Devices • HTC G1, Lenovo OPhone (expected), Kogan Agora 14
  • 15. Hello Android::ADC • The Android Developer Challenge • 10,000,000$ in prizes 15
  • 16. Hello Android::ADC • ADC I concluded: • 5M$ in prizes • Over 1,700 submissions • Announcement regarding ADC II is expected soon 16
  • 17. Hello Android::ADC Winners & Market • Wikitude (Philipp Breuce) • Wikipedia overlaid on camera view 17
  • 18. Hello Android::ADC Winners & Market • BreadCrumbz (Amos Yoffe) • Navigate using maps and pictures (like Myst) 18
  • 19. Hello Android::ADC Winners & Market • Amazon MP3 for Android • Preinstalled on HTC G1 phones 19
  • 20. Hello Android::ADC Winners & Market • Compare Everywhere (Jeffrey Sharkey) • Capture barcodes, search for better deals nearby 20
  • 21. Agenda • Hello Android • Architecture Overview, Features and Components • Android Software Development • Live Demo 21
  • 22. Architecture Overview Applications •Implement and leverage framework concepts •Use framework components and services Android Application Framework Package Content Views Activities Services Management Providers Native Libraries Android Runtime Apache Harmony Dalvik VM Graphics Media WebKit SQLite Libraries Framework Browser Database Linux Kernel Inter Process Power Device Comms. Security Management Drivers 22
  • 23. Architecture Overview • Let’s examine some of these boxes, beginning with Linux: Linux Kernel
  • 24. Architecture Overview • From Linux Android gains: • A stable common base for Dalvik applications • Fine grained power management • Unique user per bundle – sandboxing • Much more… 24
  • 25. • Native libraries provide functionality Native Libraries Linux Kernel
  • 26. Architecture Overview • WebKit • Same browser engine used in IPhone, Google Chrome, Safari • Strong performer • Memory efficient • Good standards support 26
  • 27. Architecture Overview • Location Services & Mapping • Google Maps • Street view • GPS • Trigger proximity alerts
  • 28. Architecture Overview • Graphics • SGL – 2D scalable graphics • OpenGL ES • Surface Manager composes surfaces together 28
  • 29. Architecture Overview • Media Framework • Player and codecs • SQLite • Lightweight RDBMS also on IPhone • ... and Telephony too! 29
  • 30. Architecture Overview:: Android Runtime Moving on to the “Java” runtime environment: Native Libraries Android Runtime Linux Kernel 30
  • 31. Architecture Overview:: Dalvik Virtual Machine • Java has a stack based VM • Dalvik is a register based VM • Better interpreter performance • No JIT • Bottom line: • Lower throughput • Better startup & responsiveness 31
  • 32. Architecture Overview:: Dalvik Virtual Machine • You still get to develop in Java • What, no JVM!? • Excellent learning curve 32
  • 33. Architecture Overview::Zygote • Quick Dalvik process startup is essential for good responsiveness • During boot, Android creates a fully bootstrapped Dalvik process • Sends it to sleep • Forks it on demand • Forks are copy-on-write • Near instantaneous startup! 33
  • 34. Architecture Overview Applications •Implement and leverage framework concepts •Use framework components and services Android Application Framework Package Content Views Activities Services Management Providers Native Libraries Android Runtime Apache Harmony Dalvik VM Graphics Media WebKit SQLite Libraries Framework Browser Database Linux Kernel Inter Process Power Device Comms. Security Management Drivers 34
  • 35. Agenda • Hello Android • Architecture Overview, Features and Components • Android Software Development • Live Demo 35
  • 36. Android Application Framework • Building Blocks • Application Model • UI Perspective 36
  • 37. Building Blocks • Four building blocks • Activities and Intents • Broadcast Receivers • Services • Content Providers 37
  • 38. Activities and Intents Activities Android documentation states: • “An activity is a single, focused thing that the user can do.” 38
  • 39. Activities and Intents • This how an activity will look like: 39
  • 40. Activities and Intents • Well, actually: “An activity is usually a single screen in your application.” 40
  • 41. Activities and Intents • Activities communicate with each other using Intents new Intent( ? ! Intent.ACTION_VIEW, Intent.ACTION_DIAL, Intent.ACTION_PICK, new Uri(quot;content://contactsquot;)) Uri(“geo:38.8995,- Uri(“tel:555-1234quot;)) 77.0364quot;)) • The Intent is resolved to another Activity, by matching it against an Intent Filter. 41
  • 42. Activities and Intents • Intents convey • Data This is how Intent Filters match Intents that are valid • Action for the Activity • • and Categories 42
  • 43. Activities and Intents • Activities are managed on a stack • Once you go back they pop! 43
  • 44. Activities and Intents • Activities have a life cycle New Stopped Paused Running... Activity Activity Activity Processes with non- running Activities may be killed to free resources 44
  • 45. Broadcast Receivers • Listens for Intents • Incoming call • Network availability changes • Alarms • Application doesn't have to be running once a Receiver is registered • Does not display UI • May use notifications 45
  • 46. Services • Services perform long running actions • i.e. Play music, factor primary numbers • Services are defined via AIDL • Yet another “Interface Definition Language” • Service lifecycle: manual or automatic • Can be run either in-process or in another process 46
  • 47. Content Providers • Android likes to expose content in a RESTful manner • All content items have a unique URI • Goes really well with Activity history • Content Providers are used for CRUD operations over arbitrary content repositories 47
  • 48. Content Providers • The interface has a strong relational feel • Hard to adapt to POJO backends like DB4O and Perst • Despite looking relational, the interface encourages static joins • Data returned should have a uniform shape 48
  • 49. Application Model • Android Package (.apk) • Compiled code & resources • Manifest • Must be signed (like jar) • Task • “perceived” application • May span activities across several packages and processes 49
  • 50. UI Perspective • Views • From very simple: • EditText, CheckBox, Button, Radio • To more specialized: • DatePicker, AutoComplete • ViewGroups (layout) • Relative, Table, Linear, … • Web, Video, Map, Gallery... 50
  • 51. UI Perspective • Sometimes the border between Views and Activities isn't clear • MapView • MapActivity • Choose MapActivity for a mashup • Choose MapView for your own Activity 51
  • 52. Android Software Development • Let's have a look at a “hello world” sample provided by the SDK: • Activity source file • Layout file • Android Manifest 52
  • 53. Android Software Development package com.example.android.helloactivity; //... /** * A minimal quot;Hello, World!quot; application. */ public class HelloActivity extends Activity { /** * Called with the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set the layout for this activity. You can find it // in res/layout/hello_activity.xml setContentView(R.layout.hello_activity); } } 53
  • 54. Android Software Development <EditText xmlns:android=quot;http://schemas.android.com/apk/res/androidquot; android:id=quot;@+id/textquot; android:layout_width=quot;fill_parentquot; android:layout_height=quot;fill_parentquot; android:textSize=quot;18spquot; android:autoText=quot;truequot; android:capitalize=quot;sentencesquot; android:text=quot;hello, world!quot; /> 54
  • 55. Android Software Development <manifest xmlns:android=quot;http://schemas.android.com/apk/res/androidquot; package=quot;com.example.android.helloactivityquot;> <application android:label=quot;Hello, Activity!quot;> <activity android:name=quot;HelloActivityquot;> <intent-filter> <action android:name=quot;android.intent.action.MAINquot;/> <category android:name=quot;android.intent.category.LAUNCHERquot;/> </intent-filter> </activity> </application> </manifest> 55
  • 56. Android Software Development • After build and deployment to the emulator: 56
  • 57. UI Perspective • Android UI lends itself to a clear flow between simple screens 57
  • 58. UI Perspective • Rich clients, on the other hand… … Don’t translate that well. 58
  • 59. Porting Scenarios • Opera • Opera Mini uses • Jetty has been ported • local web applications • Apache Felix has been ported • OSGi bundles • Alef Arendsen’s session covers OSGi in Spring 59
  • 60. Tool Support • Android SDK and Eclipse plugin: http://code.google.com/android/ • IntelliJ IDEA plugin is available here: http://code.google.com/p/idea-android/ • SDK can create IDEA project files • NetBeans plugin available here: http://kenai.com/projects/nbandroid/ • DroidDraw is an Android UI builder: http://www.droiddraw.org/ 60
  • 61. References • Android homepage: http://code.google.com/android/index.html • Open Handset Alliance: http://www.openhandsetalliance.com/ • Android Market: http://www.android.com/market/ • Android documentation: http://code.google.com/android/documentation.html • Android open source project: http://source.android.com/ 61
  • 62. Demo Apps for Android: http://code.google.com/p/apps-for-android 62