SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Getting started with
 Google Android
       Sean Sullivan
       July 21, 2008
Topics

• Android platform
• Developer tools
• Android programming
Android




 November 5, 2007
What is Android?

“Android is a software stack for mobile devices
that includes an operating system, middleware
and key applications”
The Big Picture
Android applications


• are written in the Java language
• run on the Dalvik virtual machine
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
Application API’s
                        java.util.*
                         java.io.*
  J2SE
                       java.lang.*
                            etc

                    android.widget.*
   UI                android.view.*
                   android.graphics.*

Telephony       android.telephony.IPhone

  SMS       android.telephony.gsm.SmsManager
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.*
Demo
Getting started




   http://code.google.com/android
Development tools


• Android SDK
• 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
• emulator - Android emulator
Android emulator
Android emulator
Emulator limitations
•   No support for placing or receiving actual phone
    calls

•   No support for camera/video capture (input)

•   No support for audio input

•   No support for determining connected state

•   No support for determining battery charge level

•   No support for Bluetooth
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 activity is designated as the entry point
  for your application
android.app.Activity
import android.app.Activity;

public class MyActivity extends Activity
{
    public void onCreate(Bundle savedValues)
    {

        super.onCreate(savedValues);

        setContentView(R.layout.main);

    }

}
Application
            building blocks
•   AndroidManifest.xml   •   Intents &
                              IntentReceivers
•   Activities
                          •   Services
•   Views
                          •   Notifications
•   Layouts
                          •   ContentProviders
Manifest file
<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.my_domain.app.helloactivity">

    <application android:label="@string/app_name">

       <activity android:name=".HelloActivity">
           <intent-filter>
               <action android:name="android.intent.action.MAIN"/>
               <category android:name="android.intent.category.LAUNCHER"/>
           </intent-filter>
       </activity>

    </application>

</manifest>



                         AndroidManifest.xml
Implementing your
     application UI

• Java code
• XML
Android UI: XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Hello World"
    />
</LinearLayout>
Android UI: Views
• an object that knows how to draw itself on
  the screen
• examples:
 •   android.widget.ListView

 •   android.widget.DatePicker

 •   android.widget.Button

 •   android.widget.ImageView
Intents

• “an Intent is a simple message object that
  represents an ‘intention’ to do something”
• “an intent is an abstract description of an
  operation to be performed”
android.content.Intent
• VIEW_ACTION
• EDIT_ACTION
• PICK_ACTION
• WEB_SEARCH_ACTION
• SYNC_ACTION
• ...
Application Context
android.app.ApplicationContext

 •   startActivity(Intent)

 •   getSystemService

 •   createDatabase

 •   openDatabase

 •   deleteDatabase

 •   ...
Additional topics
•   Threading              •   AIDL - Android IDL

•   Security model         •   Data synchronization

•   Internationalization   •   API for WiFi

•   Power management
Android resources
• http://code.google.com/android/
• http://android-developers.blogspot.com
• http://code.google.com/p/apps-for-android/
• http://sites.google.com/site/io/
• http://www.openhandsetalliance.com/
• http://git.android.com

Weitere ähnliche Inhalte

Was ist angesagt?

Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentJustin James
 
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidI/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidSittiphol Phanvilai
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSZvika Epstein
 
I/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support LibraryI/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support LibrarySittiphol Phanvilai
 
Android Design Support Library
Android Design Support LibraryAndroid Design Support Library
Android Design Support LibraryIbnu Sina Wardy
 
Use Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationUse Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationLucio Grenzi
 
12. Android Basic Google Map
12. Android Basic Google Map12. Android Basic Google Map
12. Android Basic Google MapOum Saokosal
 
Mobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 AndroidMobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 AndroidMohammad Shaker
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5Roy Clarkson
 
Ionic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the WebIonic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the WebMike Hartington
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsSasha dos Santos
 
Developing Hybrid Applications with IONIC
Developing Hybrid Applications with IONICDeveloping Hybrid Applications with IONIC
Developing Hybrid Applications with IONICFuat Buğra AYDIN
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers dssprakash
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectJoemarie Amparo
 
Create Hybrid Mobile Application with Icenium and Kendo UI Mobile
Create Hybrid Mobile Application with Icenium and Kendo UI Mobile Create Hybrid Mobile Application with Icenium and Kendo UI Mobile
Create Hybrid Mobile Application with Icenium and Kendo UI Mobile Dhananjay Kumar
 
Hybrid app in ionic framework overview
Hybrid app in ionic framework overviewHybrid app in ionic framework overview
Hybrid app in ionic framework overviewSanket Devlekar
 

Was ist angesagt? (20)

Ch2 first app
Ch2 first appCh2 first app
Ch2 first app
 
Angular Universal
Angular UniversalAngular Universal
Angular Universal
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application Development
 
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidI/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in Android
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJS
 
I/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support LibraryI/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support Library
 
Android Design Support Library
Android Design Support LibraryAndroid Design Support Library
Android Design Support Library
 
Use Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationUse Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile application
 
12. Android Basic Google Map
12. Android Basic Google Map12. Android Basic Google Map
12. Android Basic Google Map
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Mobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 AndroidMobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 Android
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Ionic framework
Ionic frameworkIonic framework
Ionic framework
 
Ionic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the WebIonic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the Web
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
 
Developing Hybrid Applications with IONIC
Developing Hybrid Applications with IONICDeveloping Hybrid Applications with IONIC
Developing Hybrid Applications with IONIC
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample Project
 
Create Hybrid Mobile Application with Icenium and Kendo UI Mobile
Create Hybrid Mobile Application with Icenium and Kendo UI Mobile Create Hybrid Mobile Application with Icenium and Kendo UI Mobile
Create Hybrid Mobile Application with Icenium and Kendo UI Mobile
 
Hybrid app in ionic framework overview
Hybrid app in ionic framework overviewHybrid app in ionic framework overview
Hybrid app in ionic framework overview
 

Ähnlich wie Androidoscon20080721 1216843094441821-9

Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development PracticesRoy Clarkson
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009sullis
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introductionaswapnal
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portlandsullis
 
Getting Started With Android
Getting Started With AndroidGetting Started With Android
Getting Started With AndroidQasim Khawaja
 
Mobile application development
Mobile application developmentMobile application development
Mobile application developmentumesh patil
 
Native Android Development with Spring
Native Android Development with SpringNative Android Development with Spring
Native Android Development with SpringRoy Clarkson
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
 
Lecture #1 Creating your first android project
Lecture #1  Creating your first android projectLecture #1  Creating your first android project
Lecture #1 Creating your first android projectVitali Pekelis
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
Android application development
Android application developmentAndroid application development
Android application developmentslidesuren
 

Ähnlich wie Androidoscon20080721 1216843094441821-9 (20)

Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
Android
AndroidAndroid
Android
 
Android studio
Android studioAndroid studio
Android studio
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Android class provider in mumbai
Android class provider in mumbaiAndroid class provider in mumbai
Android class provider in mumbai
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portland
 
Getting Started With Android
Getting Started With AndroidGetting Started With Android
Getting Started With Android
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Native Android Development with Spring
Native Android Development with SpringNative Android Development with Spring
Native Android Development with Spring
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
Lecture #1 Creating your first android project
Lecture #1  Creating your first android projectLecture #1  Creating your first android project
Lecture #1 Creating your first android project
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Android
AndroidAndroid
Android
 
Android application development
Android application developmentAndroid application development
Android application development
 

Androidoscon20080721 1216843094441821-9

  • 1. Getting started with Google Android Sean Sullivan July 21, 2008
  • 2. Topics • Android platform • Developer tools • Android programming
  • 4. What is Android? “Android is a software stack for mobile devices that includes an operating system, middleware and key applications”
  • 6. Android applications • are written in the Java language • run on the Dalvik virtual machine
  • 7. 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
  • 8. Application API’s java.util.* java.io.* J2SE java.lang.* etc android.widget.* UI android.view.* android.graphics.* Telephony android.telephony.IPhone SMS android.telephony.gsm.SmsManager
  • 9. 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.*
  • 10. Demo
  • 11. Getting started http://code.google.com/android
  • 12. Development tools • Android SDK • Eclipse plugin
  • 13. Android SDK • Android emulator • command line tools • documentation • example applications
  • 14. Command line tools • aapt - Android asset packaging tool • adb - Android debug bridge • aidl - Android IDL compiler • emulator - Android emulator
  • 17. Emulator limitations • No support for placing or receiving actual phone calls • No support for camera/video capture (input) • No support for audio input • No support for determining connected state • No support for determining battery charge level • No support for Bluetooth
  • 19. Android applications • application package file: myapp.apk • an application is composed of one or more activities
  • 20. 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
  • 21. android.app.Activity import android.app.Activity; public class MyActivity extends Activity { public void onCreate(Bundle savedValues) { super.onCreate(savedValues); setContentView(R.layout.main); } }
  • 22. Application building blocks • AndroidManifest.xml • Intents & IntentReceivers • Activities • Services • Views • Notifications • Layouts • ContentProviders
  • 23. Manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.my_domain.app.helloactivity"> <application android:label="@string/app_name"> <activity android:name=".HelloActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest> AndroidManifest.xml
  • 24. Implementing your application UI • Java code • XML
  • 25. Android UI: XML <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Hello World" /> </LinearLayout>
  • 26. Android UI: Views • an object that knows how to draw itself on the screen • examples: • android.widget.ListView • android.widget.DatePicker • android.widget.Button • android.widget.ImageView
  • 27. Intents • “an Intent is a simple message object that represents an ‘intention’ to do something” • “an intent is an abstract description of an operation to be performed”
  • 28. android.content.Intent • VIEW_ACTION • EDIT_ACTION • PICK_ACTION • WEB_SEARCH_ACTION • SYNC_ACTION • ...
  • 29. Application Context android.app.ApplicationContext • startActivity(Intent) • getSystemService • createDatabase • openDatabase • deleteDatabase • ...
  • 30. Additional topics • Threading • AIDL - Android IDL • Security model • Data synchronization • Internationalization • API for WiFi • Power management
  • 31. Android resources • http://code.google.com/android/ • http://android-developers.blogspot.com • http://code.google.com/p/apps-for-android/ • http://sites.google.com/site/io/ • http://www.openhandsetalliance.com/ • http://git.android.com