Getting Started with Android


            Sean Sullivan
              OSSPAC
          17 February 2009
05 February 2009
Singapore Telecommunications Limited (SingTel)
and HTC Corporation, a global leader in mobile
phone innov...
What is Android?

 Android is a software stack for mobile devices
 that includes an operating system, middleware
 and key ...
August 2005
  Google acquires Android


November 2007
  Open Handset Alliance announcement
  Android SDK available
Open Handset Alliance
September 2008
  HTC and T-Mobile announce G1


October 2008
  Android SDK 1.0
  Android Market goes live
  G1 available i...
Technical specs
        •   Qualcomm MSM7201A, 528 MHz

        •   ROM 256 MB

        •   RAM 192 MB

        •   4.60 i...
Technical specs
        •   3G (HSDPA)

        •   quad band GSM

        •   touch screen, HVGA 320x480

        •   QWE...
Third party applications




 lifeaware.net   Maverick   Android Locale
Android applications

• multiple applications, running simultaneously
• user may switch between running applications
• bac...
Distributing Android apps


• Android Market
• self-publish on your own web site
• use a 3rd party application store
Android Market
Android Market

• US$25 registration fee for developers
• developer receives 70% of each sale
• remaining amount goes to c...
Self-publishing

• upload application to your own web server
  http://icecondor.com/download/icecondor-v20090201.apk

• us...
System Architecture
Open source project

• http://source.android.com
• Apache 2.0 and GPL v2
• Git repository
Android applications

• are written in the Java language
• run on the Dalvik virtual machine
• Android != J2ME
Dalvik VM

• not a Java VM
• design constraints: slow CPU, little RAM
• will run on OS without swap space
•   http://sites...
Application API’s
                        java.util.*
                         java.io.*
  Java
                       jav...
Application API’s
    Web              android.webkit.WebView

   Camera        android.hardware.CameraDevice
Local databa...
Getting started




   http://developer.android.com
Development tools

         • Java SDK
         • Android SDK
         • Eclipse
         • Eclipse plugin
Android SDK

• Android emulator
• command line tools
• documentation
• example applications
Command line tools

• aapt - Android asset packaging tool
• adb - Android debug bridge
• aidl - Android IDL compiler
• emu...
Android emulator
Eclipse plugin




https://dl-ssl.google.com/android/eclipse/
Android applications


• application package file: myapp.apk
• an application is composed of one or more
  activities
Activity

• an activity is usually a single screen in your
  application
• however, activities can also be faceless
• one ...
android.app.Activity
import android.app.Activity;

public class MyActivity extends Activity
{
    public void onCreate(Bun...
Application
            building blocks
•                         •
    AndroidManifest.xml       Intents &
              ...
Manifest file
<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>

<manifest xmlns:android=quot;http://schemas.android.c...
UI development


        • XML
        • Java code
Android UI XML

<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
<LinearLayout xmlns:android=quot;http://schemas.and...
Android Views

a view is an object that knows how to draw
itself on the screen
ListView
DatePicker
MapView
Additional topics
•                          •
    Threading                  Android IDL (AIDL)

•                       ...
What’s next for Android?

             • more phones
             • virtual keyboard
             • Bluetooth A2DP
       ...
Questions?
Thank you
Android resources
• http://developer.android.com
• http://android-developers.blogspot.com
• http://code.google.com/p/apps-...
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
Upcoming SlideShare
Loading in …5
×

Getting Started with Android - OSSPAC 2009

10,617 views

Published on

Getting Started with Android
OSSPAC conference
Singapore
February 17 2009

Published in: Technology
  • Be the first to comment

Getting Started with Android - OSSPAC 2009

  1. 1. Getting Started with Android Sean Sullivan OSSPAC 17 February 2009
  2. 2. 05 February 2009 Singapore Telecommunications Limited (SingTel) and HTC Corporation, a global leader in mobile phone innovation and design, today unveiled the first Android™ powered mobile phone released in Asia - the HTC Dream™
  3. 3. What is Android? Android is a software stack for mobile devices that includes an operating system, middleware and key applications source: Google
  4. 4. August 2005 Google acquires Android November 2007 Open Handset Alliance announcement Android SDK available
  5. 5. Open Handset Alliance
  6. 6. September 2008 HTC and T-Mobile announce G1 October 2008 Android SDK 1.0 Android Market goes live G1 available in retail stores in USA
  7. 7. Technical specs • Qualcomm MSM7201A, 528 MHz • ROM 256 MB • RAM 192 MB • 4.60 in x 2.16 in x 0.62 in • 158 grams • Lithium Ion battery,1150 mAh • WiFi 802.11 b/g
  8. 8. Technical specs • 3G (HSDPA) • quad band GSM • touch screen, HVGA 320x480 • QWERTY keyboard • 3.2 megapixel camera • microSD expansion slot • GPS, compass, accelerometer
  9. 9. Third party applications lifeaware.net Maverick Android Locale
  10. 10. Android applications • multiple applications, running simultaneously • user may switch between running applications • background services • copy and paste
  11. 11. Distributing Android apps • Android Market • self-publish on your own web site • use a 3rd party application store
  12. 12. Android Market
  13. 13. Android Market • US$25 registration fee for developers • developer receives 70% of each sale • remaining amount goes to carriers • Google does not take a percentage • http://www.android.com/market/
  14. 14. Self-publishing • upload application to your own web server http://icecondor.com/download/icecondor-v20090201.apk • use correct MIME type application/vnd.android.package-archive
  15. 15. System Architecture
  16. 16. Open source project • http://source.android.com • Apache 2.0 and GPL v2 • Git repository
  17. 17. Android applications • are written in the Java language • run on the Dalvik virtual machine • Android != J2ME
  18. 18. Dalvik VM • not a Java VM • design constraints: slow CPU, little RAM • will run on OS without swap space • http://sites.google.com/site/io/dalvik-vm-internals
  19. 19. Application API’s java.util.* java.io.* Java java.lang.* etc android.widget.* UI android.view.* android.graphics.* Telephony android.telephony.* SMS android.telephony.gsm.SmsManager
  20. 20. Application API’s Web android.webkit.WebView Camera android.hardware.CameraDevice Local database android.database.* Maps com.google.android.maps.MapView Location android.location.LocationManager Multimedia android.media.MediaPlayer HTTP org.apache.http.client.*
  21. 21. Getting started http://developer.android.com
  22. 22. Development tools • Java SDK • Android SDK • Eclipse • Eclipse plugin
  23. 23. Android SDK • Android emulator • command line tools • documentation • example applications
  24. 24. Command line tools • aapt - Android asset packaging tool • adb - Android debug bridge • aidl - Android IDL compiler • emulator - Android emulator
  25. 25. Android emulator
  26. 26. Eclipse plugin https://dl-ssl.google.com/android/eclipse/
  27. 27. Android applications • application package file: myapp.apk • an application is composed of one or more activities
  28. 28. Activity • an activity is usually a single screen in your application • however, activities can also be faceless • one activity is designated as the entry point for your application
  29. 29. android.app.Activity import android.app.Activity; public class MyActivity extends Activity { public void onCreate(Bundle savedValues) { super.onCreate(savedValues); setContentView(R.layout.main); } }
  30. 30. Application building blocks • • AndroidManifest.xml Intents & IntentReceivers • Activities • Services • Views • Notifications • Layouts • ContentProviders
  31. 31. Manifest file <?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> <manifest xmlns:android=quot;http://schemas.android.com/apk/res/androidquot; package=quot;com.my_domain.app.helloactivityquot;> <application android:label=quot;@string/app_namequot;> <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> AndroidManifest.xml
  32. 32. UI development • XML • Java code
  33. 33. Android UI XML <?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> <LinearLayout xmlns:android=quot;http://schemas.android.com/apk/res/androidquot; android:orientation=quot;verticalquot; android:layout_width=quot;fill_parentquot; android:layout_height=quot;fill_parentquot; > <TextView android:layout_width=quot;fill_parentquot; android:layout_height=quot;wrap_contentquot; android:text=quot;Hello Worldquot; /> </LinearLayout>
  34. 34. Android Views a view is an object that knows how to draw itself on the screen
  35. 35. ListView
  36. 36. DatePicker
  37. 37. MapView
  38. 38. Additional topics • • Threading Android IDL (AIDL) • • Security model Data synchronization • • Internationalization WiFi API • • Power management Bluetooth API
  39. 39. What’s next for Android? • more phones • virtual keyboard • Bluetooth A2DP • multi-touch?
  40. 40. Questions?
  41. 41. Thank you
  42. 42. Android resources • http://developer.android.com • http://android-developers.blogspot.com • http://code.google.com/p/apps-for-android/ • http://sites.google.com/site/io/ • http://www.openhandsetalliance.com • http://source.android.com

×