17
Android Development Igor Birman

Android Development Overview

Embed Size (px)

Citation preview

Page 1: Android Development Overview

Android Development

Igor Birman

Page 2: Android Development Overview

Why Android?

• 300,000+ Android phones sold every day (pre Feb 10).• Eclipse + Java development on multiple platforms - Linux,

Windows, OS X• 100,000 apps available now• Tablet OS (Honeycomb) is available now

Page 3: Android Development Overview

Why Mobile?

• Mobile traffic will soon beat web traffic• Smart phones growing dramatically• The number of different tablet devices is exploding

Page 4: Android Development Overview

Android Features

• Application framework enabling reuse and replacement of components• Dalvik virtual machine optimized for mobile devices• Integrated browser based on the open source WebKit engine• Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)

• SQLite for structured data storage• Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)

• GSM Telephony (hardware dependent)• Bluetooth, EDGE, 3G, and WiFi (hardware dependent)• Camera, GPS, compass, and accelerometer (hardware dependent)• Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE

Page 5: Android Development Overview

Application Framework

• Views: Lists, grids, text boxes, buttons, etc.• Content Providers• Resource Manager• Notification Manager• Activity Manager 

Page 6: Android Development Overview

Steps to set up development environment

• Install Eclipse + JDK• Download Android SDK to a folder• Install ADT Plugin

help->install->https://dl-ssl.google.com/android/eclipse/

• Set up SDK• Create a Virtual Device (AVD)• Build "Hello Android"

Page 7: Android Development Overview

Android Emulator

• Does NOT run quickly; need a fast processor (QEMU/single core)

• Different emulators for different platforms (phone, tablet, etc)

• Ctrl-F12 to change orientation

Page 8: Android Development Overview

Hello Android

• Find imports: ctrl-shift-o• Major components: Class, Strings, Layout• Text View• Text Size

TextView tv = new TextView(this);tv.setText(R.string.hello); tv.setTextSize(100); setContentView(tv);

Page 9: Android Development Overview

Testing/Deployment Options

• Test on emulator• Debug Mode• Test on attached Android Device• Save ".apk" file• Send .apk via gmail

Page 10: Android Development Overview

API Demos

• Included with ADT

• Great resource..

Page 11: Android Development Overview

RSS Reader

• Use ListView instead of TextView• Get Internet Permissions• Borrow Code: getHTTP

Page 12: Android Development Overview

APIs

Page 13: Android Development Overview

Where to get data?

• NOVALUG: http://novalug.com/rss.xml• YouTube: http://gdata.youtube.com/feeds/api/videos?

q=skateboarding+dog&max-results=2• Google API Periodic Table: http://code.google.com/more/table/ • APIs: YouTube, Flickr, USATODAY, NYT• USATODAY: http://developer.usatoday.com/• NYT: http://developer.nytimes.com/docs• YouTube: http://www.youtube.com/dev• Flickr: http://www.flickr.com/services/api/

Page 14: Android Development Overview

Sample JSON feeds

• http://api.geonames.org/citiesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=demo

•  http://api.usatoday.com/weather/twc/20170/json?api_key=dsh4p4bhg69kp9ad2sm3jdry

Page 15: Android Development Overview

Chrome Plugins

• JSON View: https://chrome.google.com/extensions/detail/chklaanhfefbnpoihckbnefhakgolnmc

•  XML Tree: https://chrome.google.com/extensions/detail/gbammbheopgpmaagmckhpjbfgdfkpadb

Page 16: Android Development Overview

Resources

• http://developer.android.com/index.html• http://www.ibm.com/developerworks/opensource/library/x-

android/index.html• http://androidcore.com/• http://androidtutorials.org/

Page 17: Android Development Overview

Questions