Slideshare.net (beta)

 

All comments

Add a comment on Slide 1

If you have a SlideShare account, login to comment; else you can comment as a guest


Showing 1-50 of 2 (more)

Getting started with Google Android

From sullis, 3 weeks ago

Getting started with Google Android<br />OSCON 2008<br />July 21, 2008<br />

865 views  |  0 comments  |  2 favorites  |  56 downloads  |  1 embed (Stats)
Embed
options

More Info

This slideshow is Public
Total Views: 865
on Slideshare: 864
from embeds: 1

Slideshow transcript

Slide 1: Getting started with Google Android Sean Sullivan July 21, 2008

Slide 2: Topics • Android platform • Developer tools • Android programming

Slide 3: Android November 5, 2007

Slide 4: What is Android? “Android is a software stack for mobile devices that includes an operating system, middleware and key applications”

Slide 5: The Big Picture

Slide 6: Android applications • are written in the Java language • run on the Dalvik virtual machine

Slide 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

Slide 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

Slide 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.*

Slide 10: Demo

Slide 11: Getting started http://code.google.com/android

Slide 12: Development tools • Android SDK • Eclipse plugin

Slide 13: Android SDK • Android emulator • command line tools • documentation • example applications

Slide 14: Command line tools • aapt - Android asset packaging tool • adb - Android debug bridge • aidl - Android IDL compiler • emulator - Android emulator

Slide 15: Android emulator

Slide 16: Android emulator

Slide 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

Slide 18: Eclipse plugin https://dl-ssl.google.com/android/eclipse/

Slide 19: Android applications • application package file: myapp.apk • an application is composed of one or more activities

Slide 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

Slide 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); } }

Slide 22: Application building blocks • • AndroidManifest.xml Intents & IntentReceivers • Activities • Services • Views • Notifications • Layouts • ContentProviders

Slide 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

Slide 24: Implementing your application UI • Java code • XML

Slide 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>

Slide 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

Slide 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”

Slide 28: android.content.Intent • VIEW_ACTION • EDIT_ACTION • PICK_ACTION • WEB_SEARCH_ACTION • SYNC_ACTION • ...

Slide 29: Application Context android.app.ApplicationContext • startActivity(Intent) • getSystemService • createDatabase • openDatabase • deleteDatabase • ...

Slide 30: Additional topics • • Threading AIDL - Android IDL • • Security model Data synchronization • • Internationalization API for WiFi • Power management

Slide 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